Package zipkin2.codec

Class 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 Detail

      • CodecBenchmarks

        public CodecBenchmarks()
    • Method Detail

      • readClientSpan_JSON_V1

        public Span readClientSpan_JSON_V1()
      • readClientSpan_JSON_V2

        public Span readClientSpan_JSON_V2()
      • readClientSpan_PROTO3

        public Span readClientSpan_PROTO3()
      • readClientSpan_THRIFT

        public Span 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

        public List<Span> readTenClientSpans_JSON_V2()
      • writeTenClientSpans_JSON_V2

        public byte[] writeTenClientSpans_JSON_V2()
      • readChineseSpan_JSON_V1

        public Span readChineseSpan_JSON_V1()
      • readChineseSpan_JSON_V2

        public Span readChineseSpan_JSON_V2()
      • readChineseSpan_PROTO3

        public Span readChineseSpan_PROTO3()
      • readChineseSpan_THRIFT

        public Span 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

        public static void main​(String[] args)
                         throws org.openjdk.jmh.runner.RunnerException
        Throws:
        org.openjdk.jmh.runner.RunnerException