Skip to content

Commit 696c362

Browse files
committed
Make raw data numbers in compare page more readable
1 parent 293065d commit 696c362

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

site/static/compare.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,10 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
10131013

10141014
let end = commit.commit;
10151015
return `/index.html?start=${start}&end=${end}&benchmark=${testCase.benchmark}&profile=${testCase.profile}&scenario=${testCase.scenario}&stat=${stat}`;
1016-
}
1016+
},
1017+
prettifyRawNumber(number) {
1018+
return number.toLocaleString();
1019+
},
10171020
},
10181021
template: `
10191022
<div class="bench-table">
@@ -1071,12 +1074,12 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
10711074
</td>
10721075
<td v-if="showRawData" class="numeric">
10731076
<a v-bind:href="detailedQueryLink(commitA, testCase)">
1074-
<abbr :title="testCase.datumA">{{ testCase.datumA.toFixed(2) }}</abbr>
1077+
<abbr :title="testCase.datumA">{{ prettifyRawNumber(testCase.datumA) }}</abbr>
10751078
</a>
10761079
</td>
10771080
<td v-if="showRawData" class="numeric">
10781081
<a v-bind:href="detailedQueryLink(commitB, testCase)">
1079-
<abbr :title="testCase.datumB">{{ testCase.datumB.toFixed(2) }}</abbr>
1082+
<abbr :title="testCase.datumB">{{ prettifyRawNumber(testCase.datumB) }}</abbr>
10801083
</a>
10811084
</td>
10821085
</tr>

0 commit comments

Comments
 (0)