fix descriptions

This commit is contained in:
Kevin Pike 2015-10-05 09:27:28 -07:00
parent 6c7a1db6bf
commit 9a6b9d3ddf
1 changed files with 28 additions and 44 deletions

View File

@ -48,11 +48,11 @@ func NewGoCollector() *goCollector {
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("sys_bytes"), memstatNamespace("sys_bytes"),
"Number of bytes obtained from system", "Number of bytes obtained by system. Sum of all system allocations.",
nil, nil, nil, nil,
), ),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.Sys) }, eval: func(ms *runtime.MemStats) float64 { return float64(ms.Sys) },
valType: CounterValue, valType: GaugeValue,
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("lookups_total"), memstatNamespace("lookups_total"),
@ -80,7 +80,7 @@ func NewGoCollector() *goCollector {
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("heap_alloc_bytes"), memstatNamespace("heap_alloc_bytes"),
"Number heap bytes allocated and still in use.", "Number of heap bytes allocated and still in use.",
nil, nil, nil, nil,
), ),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapAlloc) }, eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapAlloc) },
@ -88,7 +88,7 @@ func NewGoCollector() *goCollector {
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("heap_sys_bytes"), memstatNamespace("heap_sys_bytes"),
"Total bytes in heap obtained from system.", "Number of heap bytes obtained from system.",
nil, nil, nil, nil,
), ),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapSys) }, eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapSys) },
@ -96,7 +96,7 @@ func NewGoCollector() *goCollector {
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("heap_idle_bytes"), memstatNamespace("heap_idle_bytes"),
"Number bytes in heap waiting to be used.", "Number of heap bytes waiting to be used.",
nil, nil, nil, nil,
), ),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapIdle) }, eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapIdle) },
@ -104,7 +104,7 @@ func NewGoCollector() *goCollector {
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("heap_inuse_bytes"), memstatNamespace("heap_inuse_bytes"),
"Number of bytes in heap that are in use.", "Number of heap bytes that are in use.",
nil, nil, nil, nil,
), ),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapInuse) }, eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapInuse) },
@ -127,7 +127,7 @@ func NewGoCollector() *goCollector {
valType: GaugeValue, valType: GaugeValue,
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("stack_bytes_inuse"), memstatNamespace("stack_inuse_bytes"),
"Number of bytes in use by the stack allocator.", "Number of bytes in use by the stack allocator.",
nil, nil, nil, nil,
), ),
@ -136,99 +136,83 @@ func NewGoCollector() *goCollector {
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("stack_sys_bytes"), memstatNamespace("stack_sys_bytes"),
"Number of bytes in obtained from system for stack allocator.", "Number of bytes obtained from system for stack allocator.",
nil, nil, nil, nil,
), ),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.StackSys) }, eval: func(ms *runtime.MemStats) float64 { return float64(ms.StackSys) },
valType: GaugeValue, valType: GaugeValue,
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("mspan_inuse"), memstatNamespace("mspan_inuse_bytes"),
"Number of mspan structures in use.", "Number of bytes in use by mspan structures.",
nil, nil, nil, nil,
), ),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.MSpanInuse) }, eval: func(ms *runtime.MemStats) float64 { return float64(ms.MSpanInuse) },
valType: GaugeValue, valType: GaugeValue,
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("mspan_sys"), memstatNamespace("mspan_sys_bytes"),
"Number of mspan structures obtained from system.", "Number of bytes used for mspan structures obtained from system.",
nil, nil, nil, nil,
), ),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.MSpanSys) }, eval: func(ms *runtime.MemStats) float64 { return float64(ms.MSpanSys) },
valType: GaugeValue, valType: GaugeValue,
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("mcache_inuse"), memstatNamespace("mcache_inuse_bytes"),
"Number of mcache structures in use.", "Number of bytes in use by mcache structures.",
nil, nil, nil, nil,
), ),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.MCacheInuse) }, eval: func(ms *runtime.MemStats) float64 { return float64(ms.MCacheInuse) },
valType: GaugeValue, valType: GaugeValue,
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("mcache_sys"), memstatNamespace("mcache_sys_bytes"),
"Number of mcache structures obtained from system.", "Number of bytes used for mcache structures obtained from system.",
nil, nil, nil, nil,
), ),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.MCacheSys) }, eval: func(ms *runtime.MemStats) float64 { return float64(ms.MCacheSys) },
valType: GaugeValue, valType: GaugeValue,
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("buck_hash_sys"), memstatNamespace("buck_hash_sys_bytes"),
"Profiling bucket hash table.", "Number of bytes used by the profiling bucket hash table.",
nil, nil, nil, nil,
), ),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.BuckHashSys) }, eval: func(ms *runtime.MemStats) float64 { return float64(ms.BuckHashSys) },
valType: GaugeValue, valType: GaugeValue,
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("gc_metadata"), memstatNamespace("gc_sys_bytes"),
"GC metadata.", "Number of bytes used for garbage collection system metadata.",
nil, nil, nil, nil,
), ),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.GCSys) }, eval: func(ms *runtime.MemStats) float64 { return float64(ms.GCSys) },
valType: GaugeValue, valType: GaugeValue,
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("other_sys"), memstatNamespace("other_sys_bytes"),
"Other system allocations.", "Number of bytes used for other system allocations.",
nil, nil, nil, nil,
), ),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.OtherSys) }, eval: func(ms *runtime.MemStats) float64 { return float64(ms.OtherSys) },
valType: GaugeValue, valType: GaugeValue,
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("next_gc"), memstatNamespace("next_gc_bytes"),
"Next collection will happen when HeapAlloc ≥ this amount.", "Number of heap bytes when next garbage collection will take place.",
nil, nil, nil, nil,
), ),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.NextGC) }, eval: func(ms *runtime.MemStats) float64 { return float64(ms.NextGC) },
valType: GaugeValue, valType: GaugeValue,
}, { }, {
desc: NewDesc( desc: NewDesc(
memstatNamespace("last_gc"), memstatNamespace("last_gc_time_seconds"),
"End time of last garbage collection (nanoseconds since 1970).", "Number of seconds since 1970 of last garbage collection.",
nil, nil, nil, nil,
), ),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.LastGC) }, eval: func(ms *runtime.MemStats) float64 { return float64(ms.LastGC*10 ^ 9) },
valType: CounterValue, valType: GaugeValue,
}, {
desc: NewDesc(
memstatNamespace("pause_total"),
"Total garbage collection pauses for all collections.",
nil, nil,
),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.PauseTotalNs) },
valType: CounterValue,
}, {
desc: NewDesc(
memstatNamespace("gc_total"),
"Number of garbage collection.",
nil, nil,
),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.NumGC) },
valType: CounterValue,
}, },
}, },
} }