mirror of
https://github.com/golang/go
synced 2024-11-05 21:26:11 -07:00
f8bbb56955
Because packing values into interface{} causes allocations this gives us a major improvement on allocation count, but tag is bigger so a significant loss on bytes allocated. It is a minor performance win overall, especially in the null exporter case when it really matters the most. name old time/op new time/op delta /Baseline-8 147ns ± 3% 146ns ± 3% ~ (p=0.349 n=5+5) /StdLog-8 6.83µs ± 1% 6.78µs ± 2% ~ (p=0.548 n=5+5) /LogNoExporter-8 1.15µs ± 1% 1.05µs ± 1% -8.63% (p=0.008 n=5+5) /TraceNoExporter-8 1.01µs ± 4% 0.99µs ± 1% ~ (p=0.087 n=5+5) /StatsNoExporter-8 1.89µs ± 0% 1.95µs ± 3% +3.27% (p=0.016 n=4+5) /Log-8 23.7µs ± 1% 24.4µs ± 6% +3.14% (p=0.032 n=5+5) /Trace-8 42.2µs ± 1% 42.2µs ± 1% ~ (p=0.841 n=5+5) /Stats-8 7.37µs ± 3% 7.10µs ± 1% -3.74% (p=0.008 n=5+5) name old alloc/op new alloc/op delta /Baseline-8 0.00B 0.00B ~ (all equal) /StdLog-8 552B ± 0% 552B ± 0% ~ (all equal) /LogNoExporter-8 680B ± 0% 1024B ± 0% +50.59% (p=0.008 n=5+5) /TraceNoExporter-8 512B ± 0% 512B ± 0% ~ (all equal) /StatsNoExporter-8 1.26kB ± 0% 2.05kB ± 0% +62.03% (p=0.008 n=5+5) /Log-8 5.20kB ± 0% 6.06kB ± 0% +16.46% (p=0.008 n=5+5) /Trace-8 11.8kB ± 0% 11.8kB ± 0% ~ (p=0.167 n=5+5) /Stats-8 2.29kB ± 0% 3.07kB ± 0% +34.27% (p=0.008 n=5+5) name old allocs/op new allocs/op delta /Baseline-8 0.00 0.00 ~ (all equal) /StdLog-8 30.0 ± 0% 30.0 ± 0% ~ (all equal) /LogNoExporter-8 30.0 ± 0% 16.0 ± 0% -46.67% (p=0.008 n=5+5) /TraceNoExporter-8 16.0 ± 0% 16.0 ± 0% ~ (all equal) /StatsNoExporter-8 62.0 ± 0% 32.0 ± 0% -48.39% (p=0.008 n=5+5) /Log-8 172 ± 0% 158 ± 0% -8.14% (p=0.008 n=5+5) /Trace-8 336 ± 0% 336 ± 0% ~ (all equal) /Stats-8 94.0 ± 0% 64.0 ± 0% -31.91% (p=0.008 n=5+5) Change-Id: I81d2443c9a32d25a5b60fffa60759caa33566da2 Reviewed-on: https://go-review.googlesource.com/c/tools/+/225381 Run-TryBot: Ian Cottrell <iancottrell@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Robert Findley <rfindley@google.com> |
||
---|---|---|
.. | ||
event.go | ||
export.go | ||
key.go | ||
label.go | ||
log.go | ||
metric.go | ||
tag_test.go | ||
tag.go | ||
trace.go |