21
21
22
22
.section {
23
23
display : flex;
24
- margin : 4 px 0 ;
24
+ margin : 10 px 0 ;
25
25
}
26
26
27
27
# commits {
62
62
font-size : 16px ;
63
63
}
64
64
65
- .section .section-heading {
66
- display : flex;
67
- flex-direction : column;
68
- justify-content : center;
69
- }
70
-
71
65
# filters-content .section-heading {
72
66
font-size : 16px ;
73
67
}
85
79
86
80
input {
87
81
border-radius : 5px ;
88
- padding : 4px ;
89
82
font-size : 12px ;
90
83
height : 100% ;
91
84
}
98
91
width : 100% ;
99
92
font-weight : bold;
100
93
background : # ADD8E6 ;
101
- margin : 10px 0 ;
102
94
}
103
95
104
96
.cache-label {
@@ -194,15 +186,15 @@ <h1>Comparing <span id="stat-header">instructions:u</span> between <span id="bef
194
186
< div class ="section ">
195
187
< div class ="section-heading "> Filter by benchmark
196
188
</ div >
197
- < input id ="filter " type ="text " v-model ="filter.name " /> </ p >
189
+ < input id ="filter " type ="text " v-model ="filter.name " />
198
190
</ div >
199
191
< div class =" section ">
200
192
< div class ="section-heading ">
201
- < div >
193
+ < div style =" width: 160px; " >
202
194
< span > Cache states</ span >
203
- < div class ="tooltip "> ?< span class ="tooltiptext ">
204
- Most benchmarks have at least 4 cache states for which we collect data
205
- </ div >
195
+ < span class ="tooltip "> ?< span class ="tooltiptext ">
196
+ Most benchmarks have at least 4 cache states for which we collect data</ span >
197
+ </ span >
206
198
</ div >
207
199
</ div >
208
200
< ul id ="states-list ">
@@ -239,6 +231,16 @@ <h1>Comparing <span id="stat-header">instructions:u</span> between <span id="bef
239
231
</ li >
240
232
</ ul >
241
233
</ div >
234
+ < div class ="section ">
235
+ < div class ="section-heading "> < span > Show only significant changes</ span >
236
+ < span class ="tooltip "> ?
237
+ < span class ="tooltiptext ">
238
+ Whether to filter out all benchmarks that do not show significant changes.
239
+ </ span >
240
+ </ span >
241
+ </ div >
242
+ < input type ="checkbox " v-model ="filter.showOnlySignificant " style ="margin-left: 20px; " />
243
+ </ div >
242
244
</ div >
243
245
</ fieldset >
244
246
< div id ="content " style ="margin-top: 15px ">
@@ -305,9 +307,9 @@ <h1>Comparing <span id="stat-header">instructions:u</span> between <span id="bef
305
307
< td >
306
308
< a
307
309
v-bind:href ="percentLink(data.b.commit, data.a.commit, bench.name, run.casename) ">
308
- < span v-bind:class ="percentClass(run.percent) "> {{ run.percent }}%{{run.isDodgy ?
309
- "?"
310
- : ""}} </ span >
310
+ < span v-bind:class ="percentClass(run.percent) ">
311
+ {{ run.percent }}%{{run.isDodgy ? "?" : ""}}
312
+ </ span >
311
313
</ a >
312
314
</ td >
313
315
</ tr >
@@ -316,7 +318,7 @@ <h1>Comparing <span id="stat-header">instructions:u</span> between <span id="bef
316
318
</ tbody >
317
319
</ table >
318
320
< br />
319
- < table class ="compare " v-if ="data && data.a.bootstrap ">
321
+ < table class ="compare " v-if ="data && data.a.bootstrap.length > 0 ">
320
322
< tr >
321
323
< td colspan ="4 "> bootstrap timings; variance is 1-3% on smaller benchmarks! Values in seconds.</ td >
322
324
</ tr >
@@ -354,6 +356,7 @@ <h1>Comparing <span id="stat-header">instructions:u</span> between <span id="bef
354
356
data : {
355
357
filter : {
356
358
name : null ,
359
+ showOnlySignificant : true ,
357
360
cache : {
358
361
full : true ,
359
362
incrFull : true ,
@@ -423,19 +426,26 @@ <h1>Comparing <span id="stat-header">instructions:u</span> between <span id="bef
423
426
let benches =
424
427
Object . keys ( data . a . data ) .
425
428
filter ( n => filter . name && filter . name . trim ( ) ? n . includes ( filter . name . trim ( ) ) : true ) .
426
- map ( name => { return { name, variants : toVariants ( name ) } } ) . filter ( b => b . variants . length > 0 ) ;
427
-
428
- for ( let bench of benches ) {
429
- let pcts = bench . variants . map ( field => parseFloat ( field . percent ) )
430
- . filter ( p => p != undefined && p != null ) ;
431
- bench . maxPct = Math . max ( ...pcts ) . toFixed ( 1 ) ;
432
- bench . minPct = Math . min ( ...pcts ) . toFixed ( 1 ) ;
433
- let sum = pcts . reduce ( ( a , b ) => a + b , 0 ) ;
434
- bench . avgPct = ( sum / pcts . length ) . toFixed ( 1 ) ;
435
- bench . maxCasenameLen = Math . max ( ...bench . variants . map ( f => f . casename . length ) ) ;
436
- }
437
- const largestChange = a => Math . max ( Math . abs ( a . minPct ) , Math . abs ( a . maxPct ) ) ;
429
+ map ( name => {
430
+ const variants = toVariants ( name ) . filter ( v => filter . showOnlySignificant ? isSignificant ( v ) : true ) ;
431
+ const pcts = variants . map ( field => parseFloat ( field . percent ) ) ;
432
+ const maxPct = Math . max ( ...pcts ) . toFixed ( 1 ) ;
433
+ const minPct = Math . min ( ...pcts ) . toFixed ( 1 ) ;
434
+ const sum = pcts . reduce ( ( a , b ) => a + b , 0 ) ;
435
+ const avgPct = ( sum / pcts . length ) . toFixed ( 1 ) ;
436
+ const maxCasenameLen = Math . max ( ...variants . map ( f => f . casename . length ) ) ;
437
+ return {
438
+ name,
439
+ variants,
440
+ maxPct,
441
+ minPct,
442
+ avgPct,
443
+ maxCasenameLen,
444
+ } ;
445
+ } ) .
446
+ filter ( b => b . variants . length > 0 ) ;
438
447
448
+ const largestChange = a => Math . max ( Math . abs ( a . minPct ) , Math . abs ( a . maxPct ) ) ;
439
449
benches . sort ( ( a , b ) => largestChange ( b ) - largestChange ( a ) ) ;
440
450
441
451
return benches ;
@@ -526,6 +536,16 @@ <h1>Comparing <span id="stat-header">instructions:u</span> between <span id="bef
526
536
}
527
537
} ) ;
528
538
539
+ function isSignificant ( variant ) {
540
+ const percent = Math . abs ( variant . percent ) ;
541
+ if ( variant . isDodgy ) {
542
+ return percent > 1.0 ;
543
+ } else {
544
+ return percent > 0.2 ;
545
+ }
546
+
547
+ }
548
+
529
549
function toggleBenchGroup ( element ) {
530
550
let next = element . parentElement . parentElement . nextElementSibling ;
531
551
let inBody = [ ]
0 commit comments