@@ -323,24 +323,40 @@ <h3>This may take a while!</h3>
323
323
let cacheStateNames = Object . keys ( cacheStates ) ;
324
324
cacheStateNames . sort ( ) ;
325
325
326
- let yAxis = "Value" ;
326
+ let yAxis = state . stat ;
327
+ let yAxisUnit = null ;
327
328
if ( state . stat == "instructions:u" ) {
328
- yAxis = "Number of CPU instructions" ;
329
+ yAxis = "CPU instructions" ;
330
+ yAxisUnit = "count" ;
329
331
} else if ( state . stat == "cycles:u" ) {
330
- yAxis = "Number of CPU cycles" ;
332
+ yAxis = "CPU cycles" ;
333
+ yAxisUnit = "count" ;
331
334
} else if ( state . stat == "cpu-clock" ) {
332
- yAxis = "Wall time execution (seconds)" ;
335
+ yAxis = "CPU clock" ;
336
+ yAxisUnit = "seconds" ;
337
+ } else if ( state . stat == "task-clock" ) {
338
+ yAxis = "Task clock" ;
339
+ yAxisUnit = "seconds" ;
333
340
} else if ( state . stat == "wall-time" ) {
334
- yAxis = "Wall time execution (seconds)" ;
341
+ yAxis = "Wall time" ;
342
+ yAxisUnit = "seconds" ;
335
343
} else if ( state . stat == "max-rss" ) {
336
- yAxis = "Maximum resident set size (kb)" ;
344
+ yAxis = "Maximum resident set size" ;
345
+ yAxisUnit = "kB" ;
337
346
} else if ( state . stat == "faults" ) {
338
347
yAxis = "Faults" ;
348
+ yAxisUnit = "count" ;
339
349
}
340
- if ( ! state . absolute ) {
341
- yAxis = "% change from baseline" ;
350
+
351
+ if ( state . kind == "raw" && benchName == "Summary" ) {
352
+ yAxisUnit = "relative" ;
353
+ } else if ( state . kind == "percentfromfirst" ) {
354
+ yAxisUnit = "% change from first" ;
355
+ } else if ( state . kind == "percentrelative" ) {
356
+ yAxisUnit = "% change from previous" ;
342
357
}
343
358
359
+ yAxis = yAxisUnit ? `${ yAxis } (${ yAxisUnit } )` : yAxis ;
344
360
let yAxisLabel = i == 0 ? yAxis : null ;
345
361
346
362
let seriesOpts = [ { } ] ;
0 commit comments