diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-01-28 10:23:44 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-01-28 10:50:52 -0500 |
commit | 47bb8b7cc2c6e7ce08d07d7ffd9781adbef43490 (patch) | |
tree | 7ad81074643b1065a60518e7d0db8bfe27b3e589 /scripts | |
parent | 33893ece1df23f9f3af2f591fd0cdd65b9c129f3 (diff) | |
download | kutter-47bb8b7cc2c6e7ce08d07d7ffd9781adbef43490.tar.gz kutter-47bb8b7cc2c6e7ce08d07d7ffd9781adbef43490.tar.xz kutter-47bb8b7cc2c6e7ce08d07d7ffd9781adbef43490.zip |
graphstats: Fix for print_stall detection
The print_stall logic could cause large portions of the graph to show
up as 100% host utilized. Rework the logic to avoid that.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/graphstats.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/graphstats.py b/scripts/graphstats.py index db55e97e..ee6eeb94 100755 --- a/scripts/graphstats.py +++ b/scripts/graphstats.py @@ -49,12 +49,12 @@ def find_print_restarts(data): # Check for buffer runoff sampletime = d['#sampletime'] buffer_time = float(d.get('buffer_time', 0.)) - if buffer_time < 1. or (buffer_time < MAXBUFFER - and buffer_time > last_buffer_time): - if not last_runoff_start: - last_runoff_start = last_sampletime - runoff_samples[last_runoff_start] = [False, []] + if (last_runoff_start and last_sampletime - sampletime < 5 + and buffer_time > last_buffer_time): runoff_samples[last_runoff_start][1].append(sampletime) + elif buffer_time < 1.: + last_runoff_start = sampletime + runoff_samples[last_runoff_start] = [False, [sampletime]] else: last_runoff_start = 0. last_buffer_time = buffer_time |