diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-08-09 18:52:13 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-08-09 19:12:27 -0400 |
commit | 5583b050a0877c037fc05ed0de522c33123e6191 (patch) | |
tree | b8958656a8075275a4093c893bf1f4cc0c4079d6 | |
parent | a38082016d5487a9003c4618f8bdde8c3b32a204 (diff) | |
download | kutter-5583b050a0877c037fc05ed0de522c33123e6191.tar.gz kutter-5583b050a0877c037fc05ed0de522c33123e6191.tar.xz kutter-5583b050a0877c037fc05ed0de522c33123e6191.zip |
graphstats: Increase maximum expected task duration
Now that tasks are only run when needed it's common for there to be a
larger variation in task execution time. When graphing load, consider
a 99-percentile task duration of 2.5ms to be 100% loaded (up from
1ms).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rwxr-xr-x | scripts/graphstats.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/graphstats.py b/scripts/graphstats.py index ca31ecda..3cb79cb2 100755 --- a/scripts/graphstats.py +++ b/scripts/graphstats.py @@ -10,6 +10,7 @@ import matplotlib.pyplot as plt, matplotlib.dates as mdates MAXBANDWIDTH=25000. MAXBUFFER=2. STATS_INTERVAL=5. +TASK_MAX=0.0025 def parse_log(logname): f = open(logname, 'rb') @@ -80,7 +81,7 @@ def plot_mcu(data, maxbw, outname, graph_awake=False): hostbuffers.append(hb) times.append(datetime.datetime.utcfromtimestamp(st)) bwdeltas.append(100. * (bw - lastbw) / (maxbw * timedelta)) - loads.append(100. * load / .001) + loads.append(100. * load / TASK_MAX) awake.append(100. * float(d.get('mcu_awake', 0.)) / STATS_INTERVAL) lasttime = st lastbw = bw |