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 Summary
Constructors Constructor Description CodecBenchmarks()
-
Method Summary
Modifier and Type Method Description static void
main(String[] args)
Span
readChineseSpan_JSON_V1()
Span
readChineseSpan_JSON_V2()
Span
readChineseSpan_PROTO3()
Span
readChineseSpan_THRIFT()
Span
readClientSpan_JSON_V1()
Span
readClientSpan_JSON_V2()
Span
readClientSpan_PROTO3()
Span
readClientSpan_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
-
CodecBenchmarks
public CodecBenchmarks()
-
-
Method Details
-
readClientSpan_JSON_V1
-
readClientSpan_JSON_V2
-
readClientSpan_PROTO3
-
readClientSpan_THRIFT
-
writeClientSpan_JSON_V2
public byte[] writeClientSpan_JSON_V2() -
writeClientSpan_JSON_V1
public byte[] writeClientSpan_JSON_V1() -
writeClientSpan_PROTO3
public byte[] writeClientSpan_PROTO3() -
writeClientSpan_THRIFT
public byte[] writeClientSpan_THRIFT() -
readTenClientSpans_JSON_V2
-
writeTenClientSpans_JSON_V2
public byte[] writeTenClientSpans_JSON_V2() -
readChineseSpan_JSON_V1
-
readChineseSpan_JSON_V2
-
readChineseSpan_PROTO3
-
readChineseSpan_THRIFT
-
writeChineseSpan_JSON_V2
public byte[] writeChineseSpan_JSON_V2() -
writeChineseSpan_JSON_V1
public byte[] writeChineseSpan_JSON_V1() -
writeChineseSpan_PROTO3
public byte[] writeChineseSpan_PROTO3() -
writeChineseSpan_THRIFT
public byte[] writeChineseSpan_THRIFT() -
main
- Throws:
org.openjdk.jmh.runner.RunnerException
-