Package zipkin2.codec
Class CodecBenchmarks
java.lang.Object
zipkin2.codec.CodecBenchmarks
- Direct Known Subclasses:
- CodecBenchmarks_jmhType_B1
public class CodecBenchmarks extends Object
The 
bundled java codec aims 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 SummaryModifier 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()
- 
Constructor Details- 
CodecBenchmarkspublic CodecBenchmarks()
 
- 
- 
Method Details- 
readClientSpan_JSON_V1
- 
readClientSpan_JSON_V2
- 
readClientSpan_PROTO3
- 
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()
- 
readTenClientSpans_JSON_V2
- 
writeTenClientSpans_JSON_V2public byte[] writeTenClientSpans_JSON_V2()
- 
readChineseSpan_JSON_V1
- 
readChineseSpan_JSON_V2
- 
readChineseSpan_PROTO3
- 
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()
- 
main- Throws:
- org.openjdk.jmh.runner.RunnerException
 
 
-