Skip to content
Snippets Groups Projects
Commit 7160e444 authored by Scott Graham's avatar Scott Graham Committed by CQ bot account: commit-bot@chromium.org
Browse files

[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
parent 2770b745
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment