@@ -342,21 +342,22 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
342
342
</ tbody >
343
343
</ table >
344
344
< br />
345
- < table class ="compare " v-if ="data && data.a.bootstrap.length > 0 ">
345
+ < table class ="compare " style =" margin: auto; " v-if ="data && Object.keys( data.a.bootstrap) .length > 0 ">
346
346
< tr >
347
347
< td colspan ="4 "> bootstrap timings; variance is 1-3% on smaller benchmarks! Values in seconds.</ td >
348
348
</ tr >
349
349
< tr >
350
350
< th > total</ th >
351
- < th > {{bootstrapTotals.a.toFixed(3)}}</ th >
352
- < th > {{bootstrapTotals.b.toFixed(3)}}</ th >
351
+ < th v-if =" bootstrapTotals.a " > A: {{bootstrapTotals.a.toFixed(3)}}</ th >
352
+ < th v-if =" bootstrapTotals.b " > B: {{bootstrapTotals.b.toFixed(3)}}</ th >
353
353
</ tr >
354
354
< template v-for ="bootstrap in bootstraps ">
355
355
< tr data-field-start ="true ">
356
356
< th style ="width: 19em; "> {{bootstrap.name}}</ th >
357
- < td > {{bootstrap.a}}</ td >
358
- < td > {{bootstrap.b}}</ td >
359
- < td > < span
357
+ < td v-if ="bootstrap.a "> {{bootstrap.a}}</ td >
358
+ < td v-if ="bootstrap.b "> {{bootstrap.b}}</ td >
359
+ < td >
360
+ < span v-if ="bootstrap.percent "
360
361
v-bind:class ="percentClass(bootstrap.percent) "> {{bootstrap.percent.toFixed(1)}}%</ span >
361
362
</ td >
362
363
</ tr >
@@ -495,13 +496,13 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
495
496
return Object . entries ( this . data . a . bootstrap ) . map ( e => {
496
497
const name = e [ 0 ] ;
497
498
498
- const format = datum => datum . toLocaleString ( 'en-US' , { minimumFractionDigits : 3 , maximumFractionDigits : 3 } ) ;
499
- const a = format ( e [ 1 ] / 1e9 ) ;
500
- const b = format ( this . data . b . bootstrap [ name ] / 1e9 ) ;
499
+ const format = datum => datum ? datum . toLocaleString ( 'en-US' , { minimumFractionDigits : 3 , maximumFractionDigits : 3 } ) : "" ;
500
+ const a = e [ 1 ] / 1e9 ;
501
+ const b = this . data . b . bootstrap [ name ] / 1e9 ;
501
502
return {
502
503
name,
503
- a,
504
- b,
504
+ a : format ( a ) ,
505
+ b : format ( b ) ,
505
506
percent : 100 * ( b - a ) / a
506
507
} ;
507
508
} ) . sort ( ( a , b ) => Math . abs ( b . percent ) - Math . abs ( a . percent ) ) ;
0 commit comments