diff options
| -rwxr-xr-x | scripts/buildstats-diff | 13 |
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") |
