forked from open-telemetry/opentelemetry-proto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change applies the refinement approach that is already performed on Traces Protobuf definitions as part of open-telemetry/oteps#59 and which proved to yield significant performance improvements. Notable changes are: - Replace google.protobuf.Timestamp by int64 time in unix epoch nanoseconds. - Eliminate unnecessary messages, move the fields into the containing message. - Replace oneof by a set of fields. Simple benchmark in Go demonstrates the following improvement compared to OpenCensus Metrics encoding and decoding: ``` BenchmarkEncode/OpenCensus/Metrics-8 2 645252504 ns/op BenchmarkEncode/OTLP/Metrics-8 4 288457433 ns/op BenchmarkDecode/OpenCensus/Metrics-8 1 1154650804 ns/op BenchmarkDecode/OTLP/Metrics-8 3 475370617 ns/op ``` Encoding is about 2.2 times faster, decoding is about 2.4 times faster. Benchmarks encode and decode 500 batches of 2 metrics: one int64 Gauge with 5 time series and one Histogram of doubles with 1 time series and single bucket. Each time series for both metrics contains 5 data points. Both metrics have 2 labels. Benchmark source code is available at: https://github.com/tigrannajaryan/exp-otelproto/blob/master/encodings/encoding_test.go
Tigran Najaryan
committed
Oct 24, 2019
1 parent
7b88843
commit 35e109f
Showing
1 changed file
with
138 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters