summaryrefslogtreecommitdiffstats
path: root/scripts/buildstats-diff
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-09-29 17:28:05 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-01 21:45:56 +0100
commit4cdf47a569c11af899e01467508110440a60c35e (patch)
treee42ce1a24bdef7ec324afb93a01fb6a188a57e6b /scripts/buildstats-diff
parentc6047cd989e09320cfd1e457b85e41dfb4e44811 (diff)
downloadpoky-4cdf47a569c11af899e01467508110440a60c35e.tar.gz
scripts/buildstats-diff: add walltime to --diff-attr
For comparing the elapsed wall clock time of tests. Default values for --min-val and --min-absdiff are 5 seconds and 2 seconds. (From OE-Core rev: 8e7a5beb2ce116bcd87111d190a4ac5d771e8884) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/buildstats-diff')
-rwxr-xr-xscripts/buildstats-diff13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/buildstats-diff b/scripts/buildstats-diff
index c6fa803445..f26a6c139e 100755
--- a/scripts/buildstats-diff
+++ b/scripts/buildstats-diff
@@ -79,6 +79,11 @@ class BSTask(dict):
79 self['child_rusage']['ru_stime'] + self['child_rusage']['ru_utime'] 79 self['child_rusage']['ru_stime'] + self['child_rusage']['ru_utime']
80 80
81 @property 81 @property
82 def walltime(self):
83 """Elapsed wall clock time"""
84 return self['elapsed_time'].total_seconds()
85
86 @property
82 def read_bytes(self): 87 def read_bytes(self):
83 """Bytes read from the block layer""" 88 """Bytes read from the block layer"""
84 return self['iostat']['read_bytes'] 89 return self['iostat']['read_bytes']
@@ -306,7 +311,7 @@ def print_task_diff(bs1, bs2, val_type, min_val=0, min_absdiff=0, sort_by=('absd
306 else: 311 else:
307 return "{:d}:{:02d}:{:04.1f}".format(h, m, s) 312 return "{:d}:{:02d}:{:04.1f}".format(h, m, s)
308 313
309 if val_type == 'cputime': 314 if 'time' in val_type:
310 if human_readable: 315 if human_readable:
311 return hms_time(val) 316 return hms_time(val)
312 else: 317 else:
@@ -437,12 +442,14 @@ Script for comparing buildstats of two separate builds."""
437 'read_bytes': 524288, 442 'read_bytes': 524288,
438 'write_bytes': 524288, 443 'write_bytes': 524288,
439 'read_ops': 500, 444 'read_ops': 500,
440 'write_ops': 500} 445 'write_ops': 500,
446 'walltime': 5}
441 min_absdiff_defaults = {'cputime': 1.0, 447 min_absdiff_defaults = {'cputime': 1.0,
442 'read_bytes': 131072, 448 'read_bytes': 131072,
443 'write_bytes': 131072, 449 'write_bytes': 131072,
444 'read_ops': 50, 450 'read_ops': 50,
445 'write_ops': 50} 451 'write_ops': 50,
452 'walltime': 2}
446 453
447 parser.add_argument('--debug', '-d', action='store_true', 454 parser.add_argument('--debug', '-d', action='store_true',
448 help="Verbose logging") 455 help="Verbose logging")