From b74e3b37479a7fa763bed1f2c76de612ee51dcbc Mon Sep 17 00:00:00 2001 From: Vladimir Lavor Date: Thu, 29 Oct 2020 12:56:24 +0100 Subject: Stats API: added GetMemory() Retrieved numbers relate to the statseg heap. Change-Id: I72750183db3524481918c71c993b39e65c28ddb6 Signed-off-by: Vladimir Lavor --- api/stats.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'api') diff --git a/api/stats.go b/api/stats.go index 2850b5f..9e1ba75 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. @@ -113,3 +114,9 @@ type BufferPool struct { Used float64 Available float64 } + +// MemoryStats represents memory stats segment counters. +type MemoryStats struct { + Total float64 + Used float64 +} -- cgit 1.2.3-korg