diff options
author | Ondrej Fabry <ofabry@cisco.com> | 2020-05-18 11:36:44 +0200 |
---|---|---|
committer | Ondrej Fabry <ofabry@cisco.com> | 2020-05-18 11:36:44 +0200 |
commit | 7ca550fd6421bdeb1e81b33198965f24398cfac1 (patch) | |
tree | 30b6b794aef5fa7f5914a1cc18c27fd3389eb9db /core/stats.go | |
parent | d372b4efe26650dbc83908ca0bbee38d90aed3e9 (diff) |
Fix stats data errors and panic for VPP 20.05
- fixes panic occurring when updating error counters
- fixes stat data length errors when updating stats
Change-Id: If2d4bcb7df084bf1999ba469f128b7a01aa6be5e
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'core/stats.go')
-rw-r--r-- | core/stats.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/stats.go b/core/stats.go index 2a9e964..0717be6 100644 --- a/core/stats.go +++ b/core/stats.go @@ -88,7 +88,7 @@ func newStatsConnection(stats adapter.StatsAPI) *StatsConnection { } } -// Connect connects to Stats API using specified adapter and returns a connection handle. +// ConnectStats connects to Stats API using specified adapter and returns a connection handle. // This call blocks until it is either connected, or an error occurs. // Only one connection attempt will be performed. func ConnectStats(stats adapter.StatsAPI) (*StatsConnection, error) { @@ -177,7 +177,7 @@ func (c *StatsConnection) updateStats(statDir **adapter.StatDir, patterns ...str return err } -// UpdateSystemStats retrieves VPP system stats. +// GetSystemStats retrieves VPP system stats. func (c *StatsConnection) GetSystemStats(sysStats *api.SystemStats) (err error) { if err := c.updateStats(&c.sysStatsData, SystemStatsPrefix); err != nil { return err |