aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorVladimir Lavor <vlavor@cisco.com>2022-05-02 13:58:04 +0200
committerVladimir Lavor <vlavor@cisco.com>2022-05-02 13:58:04 +0200
commit4a4094e6cdc7f5d9e5a470ccf82df1c780c7e224 (patch)
tree5b4a3a1bc44d4c4fbfc2c6fc849df82b437a6734 /api
parent81412d5120d44fdce66c28a53c00dd589cb73d07 (diff)
read memory stats from per-heap couters
Signed-off-by: Vladimir Lavor <vlavor@cisco.com> Change-Id: Ic4a500ea83b392eb9720575d95597bc48b44c759
Diffstat (limited to 'api')
-rw-r--r--api/stats.go19
1 files changed, 18 insertions, 1 deletions
diff --git a/api/stats.go b/api/stats.go
index 3a72c6c..d5665b7 100644
--- a/api/stats.go
+++ b/api/stats.go
@@ -117,6 +117,23 @@ type BufferPool struct {
// MemoryStats represents memory stats segment counters.
type MemoryStats struct {
+ // Deprecated: /mem/statseg total memory directory
Total float64
- Used 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
}