3 // SystemStats represents global system statistics.
4 type SystemStats struct {
12 // NodeStats represents per node statistics.
13 type NodeStats struct {
17 // NodeCounters represents node counters.
18 type NodeCounters struct {
20 NodeName string // requires VPP 19.04+
28 // InterfaceStats represents per interface statistics.
29 type InterfaceStats struct {
30 Interfaces []InterfaceCounters
33 // InterfaceCounters represents interface counters.
34 type InterfaceCounters struct {
36 InterfaceName string // requires VPP 19.04+
45 RxUnicast [2]uint64 // packets[0], bytes[1]
46 RxMulticast [2]uint64 // packets[0], bytes[1]
47 RxBroadcast [2]uint64 // packets[0], bytes[1]
48 TxUnicastMiss [2]uint64 // packets[0], bytes[1]
49 TxMulticast [2]uint64 // packets[0], bytes[1]
50 TxBroadcast [2]uint64 // packets[0], bytes[1]
60 // ErrorStats represents statistics per error counter.
61 type ErrorStats struct {
65 // ErrorCounter represents error counter.
66 type ErrorCounter struct {
71 // BufferStats represents statistics per buffer pool.
72 type BufferStats struct {
73 Buffer map[string]BufferPool
76 // BufferPool represents buffer pool.
77 type BufferPool struct {
84 // StatsProvider provides the methods for getting statistics.
85 type StatsProvider interface {
86 GetSystemStats() (*SystemStats, error)
87 GetNodeStats() (*NodeStats, error)
88 GetInterfaceStats() (*InterfaceStats, error)
89 GetErrorStats(names ...string) (*ErrorStats, error)
90 GetBufferStats() (*BufferStats, error)