Package zipkin2.codec
Class CodecBenchmarks
- java.lang.Object
- 
- zipkin2.codec.CodecBenchmarks
 
- 
- Direct Known Subclasses:
- CodecBenchmarks_jmhType_B1
 
 public class CodecBenchmarks extends Object Thebundled java codecaims to be both small in size (i.e. does not significantly increase the size of zipkin's jar), and efficient. It may not always be fastest, but we should try to keep it competitive.Note that the wire benchmarks use their structs, not ours. This will result in more efficient writes as there's no hex codec of IDs, stringifying of IPs etc. A later change could do that, but it likely still going to be more efficient than our dependency-free codec. This means in cases where extra dependencies are ok (such as our server), we could consider using wire. 
- 
- 
Constructor SummaryConstructors Constructor Description CodecBenchmarks()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)SpanreadChineseSpan_JSON_V1()SpanreadChineseSpan_JSON_V2()SpanreadChineseSpan_PROTO3()SpanreadChineseSpan_THRIFT()SpanreadClientSpan_JSON_V1()SpanreadClientSpan_JSON_V2()SpanreadClientSpan_PROTO3()SpanreadClientSpan_THRIFT()List<Span>readTenClientSpans_JSON_V2()byte[]writeChineseSpan_JSON_V1()byte[]writeChineseSpan_JSON_V2()byte[]writeChineseSpan_PROTO3()byte[]writeChineseSpan_THRIFT()byte[]writeClientSpan_JSON_V1()byte[]writeClientSpan_JSON_V2()byte[]writeClientSpan_PROTO3()byte[]writeClientSpan_THRIFT()byte[]writeTenClientSpans_JSON_V2()
 
- 
- 
- 
Method Detail- 
readClientSpan_JSON_V1public Span readClientSpan_JSON_V1() 
 - 
readClientSpan_JSON_V2public Span readClientSpan_JSON_V2() 
 - 
readClientSpan_PROTO3public Span readClientSpan_PROTO3() 
 - 
readClientSpan_THRIFTpublic Span readClientSpan_THRIFT() 
 - 
writeClientSpan_JSON_V2public byte[] writeClientSpan_JSON_V2() 
 - 
writeClientSpan_JSON_V1public byte[] writeClientSpan_JSON_V1() 
 - 
writeClientSpan_PROTO3public byte[] writeClientSpan_PROTO3() 
 - 
writeClientSpan_THRIFTpublic byte[] writeClientSpan_THRIFT() 
 - 
writeTenClientSpans_JSON_V2public byte[] writeTenClientSpans_JSON_V2() 
 - 
readChineseSpan_JSON_V1public Span readChineseSpan_JSON_V1() 
 - 
readChineseSpan_JSON_V2public Span readChineseSpan_JSON_V2() 
 - 
readChineseSpan_PROTO3public Span readChineseSpan_PROTO3() 
 - 
readChineseSpan_THRIFTpublic Span readChineseSpan_THRIFT() 
 - 
writeChineseSpan_JSON_V2public byte[] writeChineseSpan_JSON_V2() 
 - 
writeChineseSpan_JSON_V1public byte[] writeChineseSpan_JSON_V1() 
 - 
writeChineseSpan_PROTO3public byte[] writeChineseSpan_PROTO3() 
 - 
writeChineseSpan_THRIFTpublic byte[] writeChineseSpan_THRIFT() 
 - 
mainpublic static void main(String[] args) throws org.openjdk.jmh.runner.RunnerException - Throws:
- org.openjdk.jmh.runner.RunnerException
 
 
- 
 
-