1
0
mirror of https://github.com/golang/go synced 2024-11-05 20:16:13 -07:00
go/internal/telemetry
Ian Cottrell a1c56757aa internal/telemetry: remove the concept of a Tagger
The Tagger interface allowed for specifying a key in a tag list and having the
value be aquired from the context automatically. It was almost never used, and
the alternative (using the key to get the value) is not that much more long
winded, so it was not holding it's own weight from a complexity persective alone
but the performance cost of having to use a list of interface rather than a list
of tags was very large. See the benchstat improvements below for the difference
it makes to both speed and memory usage, especially in the no exporter case.

name                 old time/op    new time/op    delta
Baseline-8              341ns ± 2%     342ns ± 1%     ~     (p=0.139 n=19+18)
LoggingNoExporter-8    2.46µs ± 5%    1.97µs ± 3%  -19.88%  (p=0.000 n=19+20)
Logging-8              13.3µs ± 2%    12.8µs ± 2%   -3.42%  (p=0.000 n=17+20)
LoggingStdlib-8        5.39µs ± 6%    5.34µs ± 3%     ~     (p=0.692 n=20+19)

name                 old alloc/op   new alloc/op   delta
Baseline-8              80.0B ± 0%     80.0B ± 0%     ~     (all equal)
LoggingNoExporter-8      728B ± 0%      440B ± 0%  -39.56%  (p=0.000 n=20+20)
Logging-8              2.75kB ± 0%    2.46kB ± 0%  -10.53%  (p=0.000 n=17+20)
LoggingStdlib-8          568B ± 0%      568B ± 0%     ~     (all equal)

name                 old allocs/op  new allocs/op  delta
Baseline-8               5.00 ± 0%      5.00 ± 0%     ~     (all equal)
LoggingNoExporter-8      32.0 ± 0%      23.0 ± 0%  -28.12%  (p=0.000 n=20+20)
Logging-8                88.0 ± 0%      79.0 ± 0%  -10.23%  (p=0.000 n=20+20)
LoggingStdlib-8          28.0 ± 0%      28.0 ± 0%     ~     (all equal)

Change-Id: Ic203ad0c5de7451348976b999a0d038ac532dc39
Reviewed-on: https://go-review.googlesource.com/c/tools/+/221737
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2020-03-03 22:56:24 +00:00
..
export internal/telemetry: use atomics to get the exporter 2020-03-03 22:56:03 +00:00
log internal/telemetry: remove the concept of a Tagger 2020-03-03 22:56:24 +00:00
metric internal/telemetry/export/ocagent: attach timestamps to metrics 2019-10-24 07:31:07 +00:00
stats internal/lsp,internal/telemetry: correct stale docstrings 2020-01-15 14:25:42 +00:00
tag internal/telemetry: remove the concept of a Tagger 2020-03-03 22:56:24 +00:00
trace internal/telemetry: clean up the exporter api 2019-08-15 23:56:12 +00:00
unit internal/lsp,internal/telemetry: correct stale docstrings 2020-01-15 14:25:42 +00:00
context.go internal/telemetry: clean up the exporter api 2019-08-15 23:56:12 +00:00
doc.go internal/lsp: split the telemetry library out 2019-08-15 21:28:02 +00:00
event.go internal/lsp: add additional information when logging errors 2019-08-26 18:41:59 +00:00
id.go internal/telemetry: clean up the exporter api 2019-08-15 23:56:12 +00:00
metric.go internal/telemetry: clean up the exporter api 2019-08-15 23:56:12 +00:00
tag.go internal/telemetry: remove the concept of a Tagger 2020-03-03 22:56:24 +00:00
trace.go internal/telemetry: clean up the exporter api 2019-08-15 23:56:12 +00:00