File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -324,23 +324,33 @@ <h3>This may take a while!</h3>
324
324
cacheStateNames . sort ( ) ;
325
325
326
326
let yAxis = "Value" ;
327
+ let yAxisUnit = null ;
327
328
if ( state . stat == "instructions:u" ) {
328
329
yAxis = "Number of CPU instructions" ;
329
330
} else if ( state . stat == "cycles:u" ) {
330
331
yAxis = "Number of CPU cycles" ;
331
332
} else if ( state . stat == "cpu-clock" ) {
332
- yAxis = "Wall time execution (seconds)" ;
333
+ yAxis = "Wall time execution" ;
334
+ yAxisUnit = "seconds" ;
333
335
} else if ( state . stat == "wall-time" ) {
334
- yAxis = "Wall time execution (seconds)" ;
336
+ yAxis = "Wall time execution" ;
337
+ yAxisUnit = "seconds" ;
335
338
} else if ( state . stat == "max-rss" ) {
336
- yAxis = "Maximum resident set size (kb)" ;
339
+ yAxis = "Maximum resident set size" ;
340
+ yAxisUnit = "kb" ;
337
341
} else if ( state . stat == "faults" ) {
338
342
yAxis = "Faults" ;
339
343
}
340
- if ( ! state . absolute ) {
341
- yAxis = "% change from baseline" ;
344
+
345
+ if ( state . kind == "raw" && benchName == "Summary" ) {
346
+ yAxisUnit = "relative" ;
347
+ } else if ( state . kind == "percentfromfirst" ) {
348
+ yAxisUnit = "% change from baseline" ;
349
+ } else if ( state . kind == "percentrelative" ) {
350
+ yAxisUnit = "% change from previous" ;
342
351
}
343
352
353
+ yAxis = yAxisUnit ? `${ yAxis } (${ yAxisUnit } )` : yAxis ;
344
354
let yAxisLabel = i == 0 ? yAxis : null ;
345
355
346
356
let seriesOpts = [ { } ] ;
You can’t perform that action at this time.
0 commit comments