MCPcopy
hub / github.com/grafana/tempo / memstats

Function memstats

pkg/usagestats/stats.go:147–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

145}
146
147func memstats() interface{} {
148 stats := new(runtime.MemStats)
149 runtime.ReadMemStats(stats)
150 return map[string]interface{}{
151 "alloc": stats.Alloc,
152 "total_alloc": stats.TotalAlloc,
153 "sys": stats.Sys,
154 "heap_alloc": stats.HeapAlloc,
155 "heap_inuse": stats.HeapInuse,
156 "stack_inuse": stats.StackInuse,
157 "pause_total_ns": stats.PauseTotalNs,
158 "num_gc": stats.NumGC,
159 "gc_cpu_fraction": stats.GCCPUFraction,
160 }
161}
162
163// NewFloat returns a new Float stats object.
164// If a Float stats object with the same name already exists it is returned.

Callers 1

buildMetricsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected