[oe-commits] [openembedded-core] 21/32: oe-buildperf-report: highlight large changes in the HTML report

git at git.openembedded.org git at git.openembedded.org
Wed May 9 10:25:13 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit ed830841dd7b7b3bd95974cb59e29c15334c0c2c
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Thu Apr 26 12:35:09 2018 +0100

    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 <ross.burton at intel.com>
---
 scripts/lib/build_perf/html/report.html | 7 +++++--
 scripts/oe-build-perf-report            | 4 +++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/build_perf/html/report.html b/scripts/lib/build_perf/html/report.html
index 291ad9d..d1ba6f2 100644
--- a/scripts/lib/build_perf/html/report.html
+++ b/scripts/lib/build_perf/html/report.html
@@ -136,10 +136,13 @@ h3 {
             {% else %}
               {% set result_style = "color: orange" %}
             {%endif %}
+            {% if measurement.reldiff|abs > 2 %}
+              {% set result_style = result_style + "; font-weight: bold" %}
+            {% endif %}
             <td>{{ measurement.description }}</td>
             <td style="font-weight: bold">{{ measurement.value.mean }}</td>
             <td style="{{ result_style }}">{{ measurement.absdiff_str }}</td>
-            <td style="{{ result_style }}">{{ measurement.reldiff }}</td>
+            <td style="{{ result_style }}">{{ measurement.reldiff_str }}</td>
           </tr>
         {% endfor %}
       {% else %}
@@ -167,7 +170,7 @@ h3 {
             {% else %}
             <span style="color: orange">
             {% endif %}
-            {{ measurement.absdiff_str }} ({{measurement.reldiff}})
+            {{ measurement.absdiff_str }} ({{measurement.reldiff_str}})
             </span></span>
           </div>
           {# Table for trendchart and the statistics #}
diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report
index dc999c4..0bd05f4 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']

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list