Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
ipip: Unintialized return variable (coverity warning)
[vpp.git]
/
src
/
vpp
/
stats
/
stats.md
diff --git
a/src/vpp/stats/stats.md
b/src/vpp/stats/stats.md
index
521ab91
..
8671f56
100644
(file)
--- a/
src/vpp/stats/stats.md
+++ b/
src/vpp/stats/stats.md
@@
-61,9
+61,9
@@
A new client library can either wrap the C library (libvppapiclient.so) or it ca
### Python
```
### Python
```
-#!/usr/bin/env python
+#!/usr/bin/env python
3
from vpp_papi.vpp_stats import VPPStats
from vpp_papi.vpp_stats import VPPStats
-stats = VPPStats('/
var/run/stats.socks
')
+stats = VPPStats('/
run/vpp/stats.sock
')
dir = stats.ls(['^/if', '/err/ip4-input', '/sys/node/ip4-input'])
counters = stats.dump(dir)
dir = stats.ls(['^/if', '/err/ip4-input', '/sys/node/ip4-input'])
counters = stats.dump(dir)
@@
-82,7
+82,7
@@
int main (int argc, char **argv) {
vec_add1(patterns, "^/if");
vec_add1(patterns, "ip4-input");
vec_add1(patterns, "^/if");
vec_add1(patterns, "ip4-input");
- int rv = stat_segment_connect(
"/var/run/stats.sock"
);
+ int rv = stat_segment_connect(
STAT_SEGMENT_SOCKET_FILE
);
uint32_t *dir = stat_segment_ls(patterns);
stat_segment_data_t *res = stat_segment_dump(dir);
uint32_t *dir = stat_segment_ls(patterns);
stat_segment_data_t *res = stat_segment_dump(dir);
@@
-106,7
+106,8
@@
int main (int argc, char **argv) {
break;
case STAT_DIR_TYPE_ERROR_INDEX:
break;
case STAT_DIR_TYPE_ERROR_INDEX:
- fformat (stdout, "%llu %s\n", res[i].error_value, res[i].name);
+ for (j = 0; j < vec_len (res[i].error_vector); j++)
+ fformat (stdout, "[@%d] %llu %s\n", j, res[i].error_vector[j], res[i].name);
break;
case STAT_DIR_TYPE_SCALAR_INDEX:
break;
case STAT_DIR_TYPE_SCALAR_INDEX: