use of com.squareup.wire.ProtoWriter in project zipkin by openzipkin.
the class Proto3CodecInteropTest method encodeIsCompatible.
@Test
public void encodeIsCompatible() throws IOException {
okio.Buffer buffer = new okio.Buffer();
Span.ADAPTER.encodeWithTag(new ProtoWriter(buffer), 1, PROTO_SPAN);
assertThat(SpanBytesEncoder.PROTO3.encode(ZIPKIN_SPAN)).containsExactly(buffer.readByteArray());
}
use of com.squareup.wire.ProtoWriter in project wire by square.
the class EncodeBenchmark method wire3x.
@Benchmark
public void wire3x() throws IOException {
ProtoWriter writer = new ProtoWriter(buffer);
EmailSearchResponse.ADAPTER.encode(writer, SampleData.newMediumValueWire());
buffer.clear();
}
Aggregations