From 5583b050a0877c037fc05ed0de522c33123e6191 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 9 Aug 2017 18:52:13 -0400 Subject: [PATCH] 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 --- scripts/graphstats.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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