mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-21 03:59:04 +02:00
pdh: avoid reflection and per-scrape allocations when collecting (#2735)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -112,6 +112,9 @@ exercised a live Windows role.
|
||||
instance occurrences within a sample; their suffixes are not stable identities.
|
||||
Do not remove every name ending in `_Total`: legitimate process and database
|
||||
names can use that suffix. Use the shared aggregate-instance policy.
|
||||
`pdh.Collector.Collect` reuses the backing array of its destination slice
|
||||
and `Row.Values`; do not keep rows, sub-slices or pointers into it across
|
||||
scrapes.
|
||||
- PDH collectors add counters by English path. On a Windows installation
|
||||
without en-US resources, the 009 name table holds localized names for v2
|
||||
(manifest-based) counter sets such as `SMB Server Shares` or `HTTP Service`;
|
||||
|
||||
Reference in New Issue
Block a user