diff options
author | Vladimir Lavor <vlavor@cisco.com> | 2020-09-02 15:08:22 +0200 |
---|---|---|
committer | Ondrej Fabry <ofabry@cisco.com> | 2020-09-04 10:38:25 +0000 |
commit | 1a1f4043dfae2e77de70d6adfbb8d84cdeed658d (patch) | |
tree | 611bd02e7fd6761f17ea046d7b6444de53fa7f0f /core | |
parent | c94a962279858fb13eaacc689f47aed358373e44 (diff) |
Stats APIv2
* Compatible with stats v2 API
* Compatibility with stats v1 was persisted
* 19.04 (legacy) dropped
Change-Id: I91a3ab0c007fed6d972eee01d7caf69af29305d1
Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/stats.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/stats.go b/core/stats.go index 0717be6..cd93cc1 100644 --- a/core/stats.go +++ b/core/stats.go @@ -198,6 +198,9 @@ func (c *StatsConnection) GetSystemStats(sysStats *api.SystemStats) (err error) if ss, ok := stat.Data.(adapter.SimpleCounterStat); ok { vals = make([]uint64, len(ss)) for w := range ss { + if ss[w] == nil { + continue + } vals[w] = uint64(ss[w][0]) } } |