-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port benchmarks for the websocket encoder/decoder. #12782
Conversation
|
||
@Benchmark | ||
public Future<Void> writeWebSocketFrame() { | ||
return websocketEncoder.write(context, new BinaryWebSocketFrame(content.split())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use allocator.constBufferSupplier
in the setUp
, because after the first call to split
, the content
buffer will be empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same in the decoder benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrisvest Thanks, got it. Hmm, i also see that EmbeddedEventLoop
has changed its behavior. In 4.1 it always returns true
when calling inEventLoop()
, now only if a task running inside the current loop. I think we need to review all benchmarks because now they may not work correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrisvest PTAL again
@chrisvest @normanmaurer As i mentioned the |
6a78458
to
f260b3f
Compare
The build failed because it needs a rebase to fix imports. I don't see split showing up much in the profile. Rather, it's the always-on cleaners; |
Thanks, I'll be happy to double-check after disabling, because it's inconvenient to manually close the incoming buffer in codecs. |
I played around a bit; the smaller the |
Thanks |
Motivation:
Porting benchmarks for the websocket encoder/decoder.
Modification:
Add
WebSocketFrame13DecoderBenchmark
andWebSocketFrame13EncoderBenchmark
benchmarks.Result:
We can compare changes related to websocket performance.