[counters] Attempt to make `k counters` a bit more user-friendly
In order to reduce verbosity in the output of k counters, instead of always printing both the sum and the per-core count, only output the sum unless: 1) the user specifies a new -v option as in e.g. `k counters view -v kernel.channel.messages` 2) there's a outlier in the per-core counts that might be indicate that one core is working unusually hard. This outlier calculation used is https://en.wikipedia.org/wiki/Outlier#Tukey's_fences with k=1.5, which is not perfect. It is fairly conservative and might still output in not-so-interesting cases. ZX-3008 #comment Test: New unittest counters_tests added, quartile calc manually compared to https://docs.google.com/spreadsheets/d/1D58chwOpO-3_c41NMGJkpmFuOpGSYH-W50bD6MdOAjo/edit?usp=sharing Change-Id: I2ec5fcdb0d5320abf70fc5cea7785b380d90c29b
Showing
- kernel/include/lib/counters.h 4 additions, 5 deletionskernel/include/lib/counters.h
- kernel/include/lib/counters_private.h 22 additions, 0 deletionskernel/include/lib/counters_private.h
- kernel/lib/counters/counters.cpp 116 additions, 23 deletionskernel/lib/counters/counters.cpp
- kernel/lib/counters/counters_tests.cpp 81 additions, 0 deletionskernel/lib/counters/counters_tests.cpp
- kernel/lib/counters/rules.mk 4 additions, 2 deletionskernel/lib/counters/rules.mk
Loading
Please register or sign in to comment