Skip to content

Commit 74d4cb5

Browse files
committed
Show diff in bootstrap timings
1 parent 57ff364 commit 74d4cb5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

site/static/compare.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,10 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
380380
<th>total</th>
381381
<th v-if="bootstrapTotals.a">A: {{bootstrapTotals.a.toFixed(3)}}</th>
382382
<th v-if="bootstrapTotals.b">B: {{bootstrapTotals.b.toFixed(3)}}</th>
383+
<th v-if="bootstrapTotals.a && bootstrapTotals.b"
384+
v-bind:class="diffClass(bootstrapTotals.b - bootstrapTotals.a)">
385+
{{(bootstrapTotals.b - bootstrapTotals.a).toFixed(3)}}
386+
</th>
383387
</tr>
384388
<template v-for="bootstrap in bootstraps">
385389
<tr>
@@ -594,6 +598,16 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
594598
}
595599
return klass;
596600

601+
},
602+
diffClass(diff) {
603+
let klass = "";
604+
if (diff > 1) {
605+
klass = 'positive';
606+
} else if (diff < -1) {
607+
klass = 'negative';
608+
}
609+
return klass;
610+
597611
},
598612
detailedQueryLink(commit, bench, run) {
599613
return `/detailed-query.html?commit=${commit}&benchmark=${bench}&run_name=${run}`;

0 commit comments

Comments
 (0)