summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2019-04-18 02:25:34 +0200
committerOndrej Fabry <ofabry@cisco.com>2019-04-18 02:25:34 +0200
commitcca1d2b85f68ec11d5131dc53313f250391818a3 (patch)
treea805c32ec5afb7c00b01f1560aee2a3d1432716d /api
parente24215b47ad5cd6599973c3a76a375b99ad75d44 (diff)
Add buffer pool stats
Change-Id: I15d1df825b4d4fc760da83d9c878a621936bb6fa Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'api')
-rw-r--r--api/stats.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/api/stats.go b/api/stats.go
index 9c3a16f..0bf9908 100644
--- a/api/stats.go
+++ b/api/stats.go
@@ -68,10 +68,24 @@ type ErrorCounter struct {
Value uint64
}
+// BufferStats represents statistics per buffer pool.
+type BufferStats struct {
+ Buffer map[string]BufferPool
+}
+
+// BufferPool represents buffer pool.
+type BufferPool struct {
+ PoolName string
+ Cached float64
+ Used float64
+ Available float64
+}
+
// StatsProvider provides the methods for getting statistics.
type StatsProvider interface {
GetSystemStats() (*SystemStats, error)
GetNodeStats() (*NodeStats, error)
GetInterfaceStats() (*InterfaceStats, error)
GetErrorStats(names ...string) (*ErrorStats, error)
+ GetBufferStats() (*BufferStats, error)
}