docs: clarify which raw performance counters need a multiplier (#2775)

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
This commit is contained in:
Jan-Otto Kröpke
2026-10-16 21:58:43 +02:00
committed by GitHub
co-authored by Claude
parent be5942d943
commit dd5f441ac6
4 changed files with 47 additions and 64 deletions
@@ -442,8 +442,8 @@ func TestCollectorMetricTypePerCounter(t *testing.T) {
}
// TestCollectorMultiplier checks that the multiplier scales the exported value.
// Commit Limit only changes when a page file is resized, so both objects read
// the same value.
// Commit Limit only changes when a page file grows or is resized, which is
// unlikely between the two reads, so both objects read the same value.
func TestCollectorMultiplier(t *testing.T) {
t.Parallel()
+2 -2
View File
@@ -23,8 +23,8 @@ import (
"math"
)
// maxExactInteger is the largest integer up to which every integer has an
// exact float64 representation.
// maxExactInteger bounds the divisor. Beyond it, several integers round to the
// same reciprocal, so the rounded divisor may not be the one the user meant.
const maxExactInteger = 1 << 53
// Multiplier scales values. The zero value leaves them unchanged.
+2 -2
View File
@@ -61,8 +61,8 @@ func TestNewInvalid(t *testing.T) {
}
// TestApplyDividesExactly checks that a multiplier that is the reciprocal of
// an integer gives the correctly rounded quotient, which a plain
// multiplication misses for about one in seven values.
// an integer gives the correctly rounded quotient. A plain multiplication
// misses it for some values, for example 9 * 0.001.
func TestApplyDividesExactly(t *testing.T) {
t.Parallel()