Optimizations for statsclient 91/22091/12
authorOndrej Fabry <ofabry@cisco.com>
Tue, 17 Sep 2019 10:41:47 +0000 (12:41 +0200)
committerOndrej Fabry <ofabry@cisco.com>
Thu, 3 Oct 2019 10:54:22 +0000 (12:54 +0200)
commit809b69ea4a90455445c34bbad7d8e5fea5cf3462
treeba4b94339ac83908e2d9933692dc373929380aa7
parent48198748bdfcc7d30c794cdac19de822da53f840
Optimizations for statsclient

- 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>
17 files changed:
.gitignore
Makefile
adapter/mock/mock_stats_adapter.go
adapter/stats_api.go
adapter/statsclient/stat_segment.go
adapter/statsclient/statsclient.go
adapter/statsclient/statseg.go [new file with mode: 0644]
adapter/statsclient/version.go [deleted file]
adapter/vppapiclient/stat_client.go
adapter/vppapiclient/stat_client_stub.go
api/stats.go
core/connection.go
core/stats.go
examples/perf-bench/perf-bench.go
examples/stats-client/README.md [moved from examples/stats-api/README.md with 99% similarity]
examples/stats-client/stats_api.go [moved from examples/stats-api/stats_api.go with 52% similarity]
test/integration/stats_integration_test.go [new file with mode: 0644]