aboutsummaryrefslogtreecommitdiffstats
path: root/api/stats.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/stats.go')
-rw-r--r--api/stats.go26
1 files changed, 25 insertions, 1 deletions
diff --git a/api/stats.go b/api/stats.go
index 2850b5f..d5665b7 100644
--- a/api/stats.go
+++ b/api/stats.go
@@ -21,6 +21,7 @@ type StatsProvider interface {
GetInterfaceStats(*InterfaceStats) error
GetErrorStats(*ErrorStats) error
GetBufferStats(*BufferStats) error
+ GetMemoryStats(*MemoryStats) error
}
// SystemStats represents global system statistics.
@@ -97,7 +98,7 @@ type ErrorStats struct {
type ErrorCounter struct {
CounterName string
- Value uint64
+ Values []uint64
}
// BufferStats represents statistics per buffer pool.
@@ -113,3 +114,26 @@ type BufferPool struct {
Used float64
Available float64
}
+
+// MemoryStats represents memory stats segment counters.
+type MemoryStats struct {
+ // Deprecated: /mem/statseg total memory directory
+ Total float64
+ // Deprecated: /mem/statseg used memory directory
+ Used float64
+
+ // stat/main memory usage per-heap
+ Stat map[int]MemoryCounters
+ Main map[int]MemoryCounters
+}
+
+// MemoryCounters represents values of various memory usage
+type MemoryCounters struct {
+ Total uint64
+ Used uint64
+ Free uint64
+ UsedMMap uint64
+ TotalAlloc uint64
+ FreeChunks uint64
+ Releasable uint64
+}