Skip to content

Instantly share code, notes, and snippets.

View normanmaurer's full-sized avatar
🤙

Norman Maurer normanmaurer

🤙
View GitHub Profile
Benchmark (size) Mode Samples Score Score error Units
i.n.m.i.RecyclableArrayListBenchmark.recycleSameThread 00000 thrpt 80 33053.901 653.806 ops/ms
i.n.m.i.RecyclableArrayListBenchmark.recycleSameThread 00256 thrpt 80 31837.405 1342.619 ops/ms
i.n.m.i.RecyclableArrayListBenchmark.recycleSameThread 01024 thrpt 80 32166.010 617.588 ops/ms
i.n.m.i.RecyclableArrayListBenchmark.recycleSameThread 04096 thrpt 80 33230.992 698.395 ops/ms
i.n.m.i.RecyclableArrayListBenchmark.recycleSameThread 16384 thrpt 80 33981.831 641.349 ops/ms
i.n.m.i.RecyclableArrayListBenchmark.recycleSameThread 65536 thrpt 80 30197.887 1223.384 ops/ms
i.n.m.b.ByteBufAllocatorBenchmark.defaultPooledDirectAllocAndFree 00000 thrpt 20 10608.513 165.018 ops/ms
i.n.m.b.ByteBufAllocatorBenchmark.defaultPooledDirectAllocAndFree 00256 thrpt
Running io.netty.microbench.buffer.SwappedByteBufBenchmark
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.237 sec <<< FAILURE! - in io.netty.microbench.buffer.SwappedByteBufBenchmark
run(io.netty.microbench.buffer.SwappedByteBufBenchmark) Time elapsed: 0.03 sec <<< ERROR!
org.openjdk.jmh.runner.NoBenchmarksException: null
at org.openjdk.jmh.runner.Runner.run(Runner.java:175)
at io.netty.microbench.util.AbstractMicrobenchmark.run(AbstractMicrobenchmark.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
@State(Scope.Benchmark)
@Warmup(iterations = 25)
@Measurement(iterations = 50)
public class SwappedByteBufBenchmark extends AbstractMicrobenchmark {
private final ByteBuf buffer = Unpooled.directBuffer(8);
private final ByteBuf swappedByteBuf = new SwappedByteBuf(buffer);
private final ByteBuf unsafeSwappedByteBuf = buffer.order(ByteOrder.LITTLE_ENDIAN);
public SwappedByteBufBenchmark() {
if (unsafeSwappedByteBuf.getClass().equals(SwappedByteBuf.class)) {
/*
* Copyright 2014 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
Benchmark Mode Samples Mean Mean error Units
i.n.m.b.SwappedByteBufBenchmark.swappedByteBufSetInt thrpt 20 462235,281 33713,804 ops/ms
i.n.m.b.SwappedByteBufBenchmark.swappedByteBufSetLong thrpt 20 495231,092 7664,395 ops/ms
i.n.m.b.SwappedByteBufBenchmark.swappedByteBufSetShort thrpt 20 465994,055 28305,292 ops/ms
i.n.m.b.SwappedByteBufBenchmark.unsafeSwappedByteBufSetInt thrpt 20 448036,264 9674,808 ops/ms
i.n.m.b.SwappedByteBufBenchmark.unsafeSwappedByteBufSetLong thrpt 20 452934,999 12550,814 ops/ms
i.n.m.b.SwappedByteBufBenchmark.unsafeSwappedByteBufSetShort thrpt 20 430741,519 40414,819 ops/ms
java.lang.NullPointerException: null
at org.openjdk.jmh.output.results.JSONResultFormat.writeOut(JSONResultFormat.java:75)
at org.openjdk.jmh.output.results.ResultFormatFactory$1.writeOut(ResultFormatFactory.java:53)
at org.openjdk.jmh.runner.Runner.run(Runner.java:225)
at io.netty.microbench.util.AbstractMicrobenchmark.run(AbstractMicrobenchmark.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
public class Channel {
ChannelFuture deregister();
EventLoop eventLoop();
}
final NioEventLoopGroup group = new NioEventLoopGroup();
Bootstrap bs = new Bootstrap();
bs.channel(NioDatagramChannel.class);
bs.group(group);
bs.handler(new ChannelInitializer<Channel>() {
@Override
protected void initChannel(Channel ch) throws Exception {
ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast(new ChannelInboundHandlerAdapter() {
/*
* Copyright 2014 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
public MyClass {
protected long p00, p01, p02, p03, p04, p05, p06, p07;
protected long p10, p11, p12, p13, p14, p15, p16, p17;
private int counter;
private int yay;
protected long p20, p21, p22, p23, p24, p25, p26, p27;
protected long p30, p31, 312, p33, p34, p35, p36, p37;
}