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