Skip to content

Commit d41a542

Browse files
authored
Merge pull request #1199 from Kobzol/compare-heading
Add horizontal divider and heading to bootstrap section in compare page
2 parents 4102757 + 64c4a53 commit d41a542

File tree

1 file changed

+30
-26
lines changed

1 file changed

+30
-26
lines changed

site/static/compare.html

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -563,34 +563,38 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
563563
:commit-a="data.a.commit"
564564
:commit-b="data.b.commit"></test-cases-table>
565565
<br />
566-
<table id="bootstrap" class="compare" style="margin: auto;"
567-
v-if="data && Object.keys(data.a.bootstrap).length > 0">
568-
<tr>
569-
<td colspan="4">bootstrap timings; variance is 1-3% on smaller benchmarks! Values in seconds.</td>
570-
</tr>
571-
<tr>
572-
<th>total</th>
573-
<th v-if="bootstrapTotals.a">A: {{bootstrapTotals.a.toFixed(3)}}</th>
574-
<th v-if="bootstrapTotals.b">B: {{bootstrapTotals.b.toFixed(3)}}</th>
575-
<th v-if="bootstrapTotals.a && bootstrapTotals.b">
576-
Total: {{(bootstrapTotals.b - bootstrapTotals.a).toFixed(1)}}
577-
<div v-bind:class="diffClass(bootstrapTotals.b - bootstrapTotals.a)">
578-
({{((bootstrapTotals.b - bootstrapTotals.a ) / bootstrapTotals.a * 100).toFixed(3)}}%)
579-
</div>
580-
</th>
581-
</tr>
582-
<template v-for="bootstrap in bootstraps">
566+
<hr />
567+
<div>
568+
<div class="category-title">Bootstrap timings</div>
569+
<table id="bootstrap" class="compare" style="margin: auto;"
570+
v-if="data && Object.keys(data.a.bootstrap).length > 0">
571+
<tr>
572+
<td colspan="4">Values in seconds. Variance is 1-3% on smaller crates!</td>
573+
</tr>
583574
<tr>
584-
<th style="text-align: right; width: 19em;">{{bootstrap.name}}</th>
585-
<td v-if="bootstrap.a">{{bootstrap.a}}</td>
586-
<td v-if="bootstrap.b">{{bootstrap.b}}</td>
587-
<td>
588-
<span v-if="bootstrap.percent"
589-
v-bind:class="percentClass(bootstrap.percent)">{{bootstrap.percent.toFixed(1)}}%</span>
590-
</td>
575+
<th>total</th>
576+
<th v-if="bootstrapTotals.a">A: {{bootstrapTotals.a.toFixed(3)}}</th>
577+
<th v-if="bootstrapTotals.b">B: {{bootstrapTotals.b.toFixed(3)}}</th>
578+
<th v-if="bootstrapTotals.a && bootstrapTotals.b">
579+
Total: {{(bootstrapTotals.b - bootstrapTotals.a).toFixed(1)}}
580+
<div v-bind:class="diffClass(bootstrapTotals.b - bootstrapTotals.a)">
581+
({{((bootstrapTotals.b - bootstrapTotals.a ) / bootstrapTotals.a * 100).toFixed(3)}}%)
582+
</div>
583+
</th>
591584
</tr>
592-
</template>
593-
</table>
585+
<template v-for="bootstrap in bootstraps">
586+
<tr>
587+
<th style="text-align: right; width: 19em;">{{bootstrap.name}}</th>
588+
<td v-if="bootstrap.a">{{bootstrap.a}}</td>
589+
<td v-if="bootstrap.b">{{bootstrap.b}}</td>
590+
<td>
591+
<span v-if="bootstrap.percent"
592+
v-bind:class="percentClass(bootstrap.percent)">{{bootstrap.percent.toFixed(1)}}%</span>
593+
</td>
594+
</tr>
595+
</template>
596+
</table>
597+
</div>
594598
</div>
595599
</div>
596600
<br>

0 commit comments

Comments
 (0)