Closed
Conversation
Motivation: Optimizing the Epoll channel needs an objective measure of how fast it is. Modification: Add a simple, closed loop, ping-pong benchmark. Result: Benchmark can be used to measure netty#7816 Initial numbers: ``` Result "io.netty.microbench.channel.epoll.EpollSocketChannelBenchmark.pingPong": 22614.403 ±(99.9%) 797.263 ops/s [Average] (min, avg, max) = (21093.160, 22614.403, 24977.387), stdev = 918.130 CI (99.9%): [21817.140, 23411.666] (assumes normal distribution) Benchmark Mode Cnt Score Error Units EpollSocketChannelBenchmark.pingPong thrpt 20 22614.403 ± 797.263 ops/s ```
2474a12 to
bc69040
Compare
Member
Author
|
normanmaurer
requested changes
Sep 2, 2018
| private ScheduledFuture<?> future; | ||
|
|
||
| @Setup | ||
| public void setup() throws Exception { |
| public void channelRead(ChannelHandlerContext ctx, Object msg) { | ||
| if (msg instanceof ByteBuf) { | ||
| ctx.writeAndFlush(msg, ctx.voidPromise()); | ||
| return; |
| protected void initChannel(Channel ch) { | ||
| ch.pipeline().addLast(new ChannelDuplexHandler() { | ||
|
|
||
| ChannelPromise lastWritePromise; |
normanmaurer
reviewed
Sep 3, 2018
| <dependency> | ||
| <groupId>${project.groupId}</groupId> | ||
| <artifactId>netty-transport-native-epoll</artifactId> | ||
| <version>${project.version}</version> |
Member
There was a problem hiding this comment.
classifier is missing:
<classifier>linux-x86_64</classifier>
Member
Author
|
@normanmaurer PTAL |
Member
|
@carl-mastrangelo thanks! Made a small change so we are able to compile the microbenchmarks still on macOS and pulled in. |
Member
|
Cherry-picked as 379a56c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
Optimizing the Epoll channel needs an objective measure of how fast
it is.
Modification:
Add a simple, closed loop, ping-pong benchmark.
Result:
Benchmark can be used to measure #7816