X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=api%2Fstats.go;fp=api%2Fstats.go;h=0bf990829179d1e32e4117343275782b6f6f5129;hb=cca1d2b85f68ec11d5131dc53313f250391818a3;hp=9c3a16fc17153d539b525935764f19142a5e95b6;hpb=e24215b47ad5cd6599973c3a76a375b99ad75d44;p=govpp.git 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) }