From 500e28311248713d4772480b81b10777390da909 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Thu, 26 Apr 2018 12:35:09 +0100 Subject: oe-buildperf-report: highlight large changes in the HTML report If the relative difference is greater than 2%, make the text bold to highlight it. Signed-off-by: Ross Burton --- scripts/oe-build-perf-report | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/oe-build-perf-report') diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report index dc999c45c1..0bd05f44ef 100755 --- a/scripts/oe-build-perf-report +++ b/scripts/oe-build-perf-report @@ -416,9 +416,11 @@ def print_html_report(data, id_comp, buildstats): samples[-1]['commit_num'] = commit_num absdiff = samples[-1]['val_cls'](samples[-1]['mean'] - samples[id_comp]['mean']) + reldiff = absdiff * 100 / samples[id_comp]['mean'] new_meas['absdiff'] = absdiff new_meas['absdiff_str'] = str(absdiff) if absdiff < 0 else '+' + str(absdiff) - new_meas['reldiff'] = "{:+.1f} %".format(absdiff * 100 / samples[id_comp]['mean']) + new_meas['reldiff'] = reldiff + new_meas['reldiff_str'] = "{:+.1f} %".format(reldiff) new_meas['samples'] = samples new_meas['value'] = samples[-1] new_meas['value_type'] = samples[-1]['val_cls'] -- cgit v1.2.3