You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zipkin.apache.org by GitBox <gi...@apache.org> on 2019/05/10 08:58:22 UTC

[GitHub] [incubator-zipkin] adriancole commented on a change in pull request #2579: Benchmark bytes / bytebuffer, protobuf vs zipkin vs wire.

adriancole commented on a change in pull request #2579: Benchmark bytes / bytebuffer, protobuf vs zipkin vs wire.
URL: https://github.com/apache/incubator-zipkin/pull/2579#discussion_r282802053
 
 

 ##########
 File path: benchmarks/src/main/java/zipkin2/codec/ProtoCodecBenchmarks.java
 ##########
 @@ -0,0 +1,110 @@
+package zipkin2.codec;
+
+import com.google.common.io.Resources;
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.ByteBufUtil;
+import io.netty.buffer.PooledByteBufAllocator;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import okio.ByteString;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Fork;
+import org.openjdk.jmh.annotations.Measurement;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+import org.openjdk.jmh.annotations.Param;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.Setup;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.annotations.TearDown;
+import org.openjdk.jmh.annotations.Threads;
+import org.openjdk.jmh.annotations.Warmup;
+import org.openjdk.jmh.runner.Runner;
+import org.openjdk.jmh.runner.RunnerException;
+import org.openjdk.jmh.runner.options.Options;
+import org.openjdk.jmh.runner.options.OptionsBuilder;
+import zipkin2.Span;
+
+@Measurement(iterations = 5, time = 1)
+@Warmup(iterations = 10, time = 1)
+@Fork(3)
+@BenchmarkMode(Mode.AverageTime)
 
 Review comment:
   ```
   @BenchmarkMode(Mode.SampleTime)
   ```
   
   then you can also look at the following, which I use grep for
   
   where /tmp/foo is output from this
   ```bash
   $ egrep '(p0.999 |gc.alloc.rate.norm)' /tmp/foo
   ```
   
   note that sometimes things that make sense also don't because things aren't in isolation. For example, you could imagine the combinatory effect of shared buffers parsing and encoding to be of interest. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services