@@ -342,21 +342,22 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
342342 </ tbody >
343343 </ table >
344344 < 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 ">
346346 < tr >
347347 < td colspan ="4 "> bootstrap timings; variance is 1-3% on smaller benchmarks! Values in seconds.</ td >
348348 </ tr >
349349 < tr >
350350 < 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 >
353353 </ tr >
354354 < template v-for ="bootstrap in bootstraps ">
355355 < tr data-field-start ="true ">
356356 < 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 "
360361 v-bind:class ="percentClass(bootstrap.percent) "> {{bootstrap.percent.toFixed(1)}}%</ span >
361362 </ td >
362363 </ tr >
@@ -495,13 +496,13 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
495496 return Object . entries ( this . data . a . bootstrap ) . map ( e => {
496497 const name = e [ 0 ] ;
497498
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 ;
501502 return {
502503 name,
503- a,
504- b,
504+ a : format ( a ) ,
505+ b : format ( b ) ,
505506 percent : 100 * ( b - a ) / a
506507 } ;
507508 } ) . sort ( ( a , b ) => Math . abs ( b . percent ) - Math . abs ( a . percent ) ) ;
0 commit comments