aboutsummaryrefslogtreecommitdiffstats
path: root/adapter/vppapiclient
diff options
context:
space:
mode:
authorVladimir Lavor <vlavor@cisco.com>2021-05-13 11:15:48 +0200
committerVladimir Lavor <vlavor@cisco.com>2021-05-26 09:53:08 +0200
commitba6e92d715c59dc71c4e18e66b262d07578d524b (patch)
treecfea5f53750b52d3eccf7bdb1947936dd7e31ee1 /adapter/vppapiclient
parentc380ee6064379258768fdfe4e9d4ad9138980ec0 (diff)
statsclient: added symlinks
Symlink support based on https://gerrit.fd.io/r/c/vpp/+/31636 Added new stat types `CounterStat` and `CombinedCounterStat` which represent simple/combined value of a single item (interface, node) as a array of values by workers. Example: /if/names NameVector [local0 tap0 tap1] /if/ip6 SimpleCounterVector [[0 9 0] [0 25 3] [0 0 60] [0 0 0]] /interfaces/tap0/ip6 SimpleCounterVector [[9] [25] [0] [0]] /interfaces/tap1/ip6 SimpleCounterVector [[0] [3] [60] [0]] Field `Symlink` added to StatEntry to mark symlink stats. For stats v2 only Change-Id: Iadc825f3c42b05bfc9a91462dba8a0b0068c7cd6 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
Diffstat (limited to 'adapter/vppapiclient')
-rw-r--r--adapter/vppapiclient/stat_client.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/adapter/vppapiclient/stat_client.go b/adapter/vppapiclient/stat_client.go
index 734c158..9de2028 100644
--- a/adapter/vppapiclient/stat_client.go
+++ b/adapter/vppapiclient/stat_client.go
@@ -153,10 +153,10 @@ func (c *statClient) DumpStats(patterns ...string) (stats []adapter.StatEntry, e
vector := make([][]adapter.CombinedCounter, length)
for k := 0; k < length; k++ {
for j := 0; j < int(C.govpp_stat_segment_vec_len(unsafe.Pointer(C.govpp_stat_segment_data_get_combined_counter_index(&v, C.int(k))))); j++ {
- vector[k] = append(vector[k], adapter.CombinedCounter([2]uint64{
+ vector[k] = append(vector[k], [2]uint64{
uint64(C.govpp_stat_segment_data_get_combined_counter_index_packets(&v, C.int(k), C.int(j))),
uint64(C.govpp_stat_segment_data_get_combined_counter_index_bytes(&v, C.int(k), C.int(j))),
- }))
+ })
}
}
stat.Data = adapter.CombinedCounterStat(vector)
@@ -186,15 +186,15 @@ func (c *statClient) DumpStats(patterns ...string) (stats []adapter.StatEntry, e
return stats, nil
}
-func (c *statClient) PrepareDir(prefixes ...string) (*adapter.StatDir, error) {
+func (c *statClient) PrepareDir(_ ...string) (*adapter.StatDir, error) {
return nil, adapter.ErrNotImplemented
}
-func (c *statClient) PrepareDirOnIndex(indexes ...uint32) (*adapter.StatDir, error) {
+func (c *statClient) PrepareDirOnIndex(_ ...uint32) (*adapter.StatDir, error) {
return nil, adapter.ErrNotImplemented
}
-func (c *statClient) UpdateDir(dir *adapter.StatDir) error {
+func (c *statClient) UpdateDir(_ *adapter.StatDir) error {
return adapter.ErrNotImplemented
}