aboutsummaryrefslogtreecommitdiffstats
path: root/adapter/vppapiclient/stat_client.go
AgeCommit message (Collapse)AuthorFilesLines
2022-08-02Change module name to go.fd.io/govppHEADv0.6.0-alphamasterNathan Skrzypczak1-1/+1
We are changing the module name from git.fd.io/govpp.git to go.fd.io/govpp to make repository migration easier. Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: Idd6e0d583a92f6b82fe9adeffd026cd6b856038b
2021-05-26statsclient: added symlinksVladimir Lavor1-5/+5
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>
2021-05-05statsclient: allow index as patternVladimir Lavor1-4/+14
* ListStats() returns stats identifiers containing the stat name and index * New method PrepareDirOnIndex(indexes...). Instead of the name filter it does not browse through all available indexes * Stats example shows how to get the last epoch value (added "e" or "epoch" command) Change-Id: Ibb15090fb0dfdb7f9b0ecf8ac07a5eb9a9ace8f8 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2021-03-03Provide error counters per worker for statsclientVladimir Lavor1-1/+1
Instead of a single value, the ErrorCounter now contains an array representing couter values per workers. Change-Id: I2b869e5b228bcb3e155b1fef08a4cd00e7d2e16a Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2019-10-03Optimizations for statsclientOndrej Fabry1-10/+18
- this dramatically improves performance for stats data collection - memory allocation is now done only when stat dirs change - updating prepared stat dir does not need to allocate memory - created integration test for testing stats client - added NumWorkerThreads and VectorRatePerWorker to SystemStats - added ReduceSimpleCounterStatIndex, ReduceCombinedCounterStatIndex for aggregating specific index Change-Id: I702731a69024ab5dd0832bb5cfe2773a987359e5 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-08-08Add tag beyond18.10 to prevent build stat_clientRinat Baygildin1-1/+1
There is a problem to use upstream govpp with vpp 18.04 because of lack stat_client.h file. Build tag allows to exclude stat client from old vpp versions. Signed-off-by: Rinat Baygildin <bayrinat@yandex-team.ru> Change-Id: Ic39029b0c4577f88ff8796dfd14e6a2696f85f4c
2019-08-02Migrate to modules, refactor Makefile and use Travis for CIOndrej Fabry1-1/+1
- migrate to Go modules and remove vendor - refactor Makefile - add version package and store version - split extras from the rest - use travis for CI Change-Id: I81b35220653b0f7c9a0fcdd4c527d691ec1e96c1 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-06-20Add statsclient - pure Go implementation for stats APIOndrej Fabry1-16/+5
Change-Id: Ia5bab652c6089378697459f477f9060dc7a53e90 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-05-31Support for error vectorsOndrej Fabry1-0/+7
- this fixes compilation error for VPP 19.08 and keeps backwards compatibility with previous versions Change-Id: Ib58557a090caa5e8342c0cb21de8af684cb18137 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-05-06Fix compilation for VPP 19.01Ondrej Fabry1-138/+2
This commit introduces header files for wrapping vppapiclient library. The stat_client_wrapper.h now uses macro to determine version of stats API. Change-Id: Ife218e0e90742e9a22fd12ca77307fbd0cc7d714 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-23Add comments to provide info about VPP requirementsOndrej Fabry1-3/+3
Change-Id: I116b9c0ab064418940eec82fb1442d30816386d7 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-18Check if dir ls/dump returns nilOndrej Fabry1-0/+15
Change-Id: I9a0a74f53825fc0255bc664c06e32eaef6c45d82 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-16Fix crash in stats for removed interfaces/nodesOndrej Fabry1-3/+4
Change-Id: I36b4cd2625c7f0c5846fe402be7b2aeece4707f8 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-11Add support for names vector and fill name in interface/node statsOndrej Fabry1-2/+26
Change-Id: I3a6bcb635701c0f00e47d04fce2113e1ac23b67b Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-03-21Fixup build with golang 1.12Nicolas PLANEL1-5/+5
_Ctype_ direct call are prohibited, use C namespace instead. Change-Id: Ifd77469e15a10ce8381b8308282d549c62f1318c Signed-off-by: Nicolas PLANEL <nplanel@redhat.com>
2018-10-23Unexport adapter implementations to make it clear that API interfaces should ↵Ondrej Fabry1-9/+19
be used - this decision was made to follow more idiomatic Go, described in https://golang.org/doc/effective_go.html#generality Change-Id: I341556c792df77ca35a60a1e4afc541482f23734 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2018-10-22Introduce StatsAPI and it's initial implementationOndrej Fabry1-0/+279
- this implementation is basically Go wrapper around VPP's vppapiclient C library Change-Id: I6f53dc3e228868834bf3a8a00c686ad05e22f3dd Signed-off-by: Ondrej Fabry <ofabry@cisco.com>