diff options
author | Noah Eisen <ncteisen@gmail.com> | 2017-06-09 07:48:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-09 07:48:24 -0700 |
commit | 18528f28f3600123e356e9367e462fab96081d77 (patch) | |
tree | e1a8f91585d6b109c7f215cb0b801dbe812ef1fa /tools/profiling/microbenchmarks/bm_diff/bm_diff.py | |
parent | 74923accac565cd7a4bd07b6ff054e8464f65fc1 (diff) | |
parent | 6a5e923a81acf22a75c4977930daf2b161018769 (diff) |
Merge pull request #11444 from ncteisen/quiet-down
Only Output bm_diff Crashes if They Occur
Diffstat (limited to 'tools/profiling/microbenchmarks/bm_diff/bm_diff.py')
-rwxr-xr-x | tools/profiling/microbenchmarks/bm_diff/bm_diff.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/profiling/microbenchmarks/bm_diff/bm_diff.py b/tools/profiling/microbenchmarks/bm_diff/bm_diff.py index 881e157ccd..b8e803749a 100755 --- a/tools/profiling/microbenchmarks/bm_diff/bm_diff.py +++ b/tools/profiling/microbenchmarks/bm_diff/bm_diff.py @@ -185,9 +185,14 @@ def diff(bms, loops, track, old, new): for name in sorted(benchmarks.keys()): if benchmarks[name].skip(): continue rows.append([name] + benchmarks[name].row(fields)) - note = 'Corrupt JSON data (indicates timeout or crash) = %s' % str( - badjson_files) - note += '\n\nMissing files (new benchmark) = %s' % str(nonexistant_files) + note = None + if len(badjson_files): + note = 'Corrupt JSON data (indicates timeout or crash) = %s' % str(badjson_files) + if len(nonexistant_files): + if note: + note += '\n\nMissing files (indicates new benchmark) = %s' % str(nonexistant_files) + else: + note = '\n\nMissing files (indicates new benchmark) = %s' % str(nonexistant_files) if rows: return tabulate.tabulate(rows, headers=headers, floatfmt='+.2f'), note else: |