108
108
109
109
# states-list {
110
110
display : flex;
111
- justify-content : space-around;
112
- align-items : center;
113
- width : 80% ;
111
+ flex-direction : column;
112
+ align-items : start;
114
113
list-style : none;
115
114
margin : 0 ;
115
+ padding : 0 ;
116
+ }
117
+ .section-scenarios {
118
+ flex-direction : column;
119
+ }
120
+
121
+ @media (min-width : 760px ) {
122
+ # states-list {
123
+ justify-content : space-around;
124
+ flex-direction : row;
125
+ align-items : center;
126
+ width : 80% ;
127
+ }
128
+ .section-scenarios {
129
+ flex-direction : row;
130
+ }
116
131
}
117
132
118
133
.tooltip {
221
236
border-radius : 6px ;
222
237
}
223
238
239
+ .summary-container {
240
+ display : flex;
241
+ flex-direction : column;
242
+ margin-bottom : 10px ;
243
+ }
224
244
.summary {
225
245
display : flex;
226
- justify-content : center;
227
- align-items : center;
228
- width : 20% ;
229
246
}
230
- .summary-wide {
231
- width : 35% ;
247
+ .summary-values {
248
+ display : flex;
249
+ flex-direction : column;
250
+ }
251
+ @media (min-width : 650px ) {
252
+ .summary-container {
253
+ flex-direction : row;
254
+ margin-bottom : 0 ;
255
+ align-items : center;
256
+ }
257
+ .summary-container > span {
258
+ text-align : right;
259
+ width : 20% ;
260
+ }
261
+ .summary-values {
262
+ width : 100% ;
263
+ flex-direction : row;
264
+ justify-content : flex-end;
265
+ align-items : center;
266
+ }
267
+ .summary {
268
+ width : 15% ;
269
+ align-items : center;
270
+ }
271
+ .summary-wide {
272
+ width : 20% ;
273
+ }
232
274
}
233
275
</ style >
234
276
< script src ="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js "> </ script >
@@ -303,7 +345,7 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
303
345
< div class ="section-heading "> Filter</ div >
304
346
< input id ="filter " type ="text " v-model ="filter.name " />
305
347
</ div >
306
- < div class =" section ">
348
+ < div class ="section section-scenarios ">
307
349
< div class ="section-heading ">
308
350
< div style ="width: 160px; ">
309
351
< span > Scenarios</ span >
@@ -406,10 +448,19 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
406
448
< p v-if ="dataLoading && !data "> Loading ...</ p >
407
449
< div v-if ="data " id ="content " style ="margin-top: 15px ">
408
450
< div id ="summary ">
409
- < div v-for ="summaryPair in Object.entries(summary) " style ="display: flex; ">
410
- < span style ="font-weight: bold; width: 30%; margin-left: 15%; text-transform: capitalize; "> {{
451
+ < div style ="display: flex; justify-content: end; ">
452
+ < span class ="tooltip " style ="margin-right: 1em; "> ?
453
+ < span class ="tooltiptext ">
454
+ The percents show arithmetic mean amongst regressions, amongst improvements
455
+ and finally amongst all benchmarks in each category (all benchmarks or
456
+ filtered benchmarks).
457
+ </ span >
458
+ </ span >
459
+ </ div >
460
+ < div v-for ="summaryPair in Object.entries(summary) " class ="summary-container ">
461
+ < span style ="font-weight: bold; margin-left: 5px; text-transform: capitalize; "> {{
411
462
summaryPair[0] }}:</ span >
412
- < div style =" display: flex; justify-content: flex-end; width: 80%; margin-right: 5%; ">
463
+ < div class =" summary-values ">
413
464
< span class ="summary summary-wide positive ">
414
465
{{summaryPair[1].regressions.toString().padStart(3, " ")}}
415
466
< svg style ="width:18px;height:18px " viewBox ="0 0 24 24 ">
@@ -435,7 +486,7 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
435
486
({{(summaryPair[1].improvements_avg).toFixed(2)}}%)
436
487
</ span >
437
488
< span class ="summary " v-bind:class ="percentClass(summaryPair[1].average) ">
438
- {{ signIfNegative (summaryPair[1].average) }}{{ (summaryPair[1].average).toFixed(2) }}%
489
+ {{ signIfPositive (summaryPair[1].average) }}{{ (summaryPair[1].average).toFixed(2) }}%
439
490
</ span >
440
491
</ div >
441
492
</ div >
@@ -768,11 +819,11 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
768
819
prLink ( pr ) {
769
820
return `https://github.com/rust-lang/rust/pull/${ pr } ` ;
770
821
} ,
771
- signIfNegative ( pct ) {
822
+ signIfPositive ( pct ) {
772
823
if ( pct >= 0 ) {
773
- return "" ;
824
+ return "+ " ;
774
825
}
775
- return "- " ;
826
+ return "" ;
776
827
} ,
777
828
percentClass ( pct ) {
778
829
let klass = "" ;
0 commit comments