Commit graph

5 commits

Author SHA1 Message Date
Martin Holst Swende
0295992985
metrics: simplify interfaces, convert tests to table-driven 2023-09-04 12:33:26 +02:00
Martin Holst Swende
2ed1f05ff5
metrics: split ewma, create dedicated nil snapshot type 2023-09-02 13:43:08 +02:00
Martin Holst Swende
9591faf40d
metrics: separate updatable/readonly sample, runtimehistogram + do early sample calculation to avoid later iterations 2023-08-31 19:51:35 +02:00
Martin Holst Swende
7e6f1a6869
metrics: separate updatable/readonly meter, timer and histogram 2023-08-31 19:51:30 +02:00
Felix Lange
c539bda166
metrics: improve reading Go runtime metrics (#25886)
This changes how we read performance metrics from the Go runtime. Instead
of using runtime.ReadMemStats, we now rely on the API provided by package
runtime/metrics.

runtime/metrics provides more accurate information. For example, the new
interface has better reporting of memory use. In my testing, the reported
value of held memory more accurately reflects the usage reported by the OS.

The semantics of metrics system/memory/allocs and system/memory/frees have
changed to report amounts in bytes. ReadMemStats only reported the count of
allocations in number-of-objects. This is imprecise: 'tiny objects' are not
counted because the runtime allocates them in batches; and certain
improvements in allocation behavior, such as struct size optimizations,
will be less visible when the number of allocs doesn't change.

Changing allocation reports to be in bytes makes it appear in graphs that
lots more is being allocated. I don't think that's a problem because this
metric is primarily interesting for geth developers.

The metric system/memory/pauses has been changed to report statistical
values from the histogram provided by the runtime. Its name in influxdb has
changed from geth.system/memory/pauses.meter to
geth.system/memory/pauses.histogram.

We also have a new histogram metric, system/cpu/schedlatency, reporting the
Go scheduler latency.
2022-11-11 13:16:13 +01:00