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 // StatsProvider provides the methods for getting statistics.
72 type StatsProvider interface {
73 GetSystemStats() (*SystemStats, error)
74 GetNodeStats() (*NodeStats, error)
75 GetInterfaceStats() (*InterfaceStats, error)
76 GetErrorStats(names ...string) (*ErrorStats, error)