@@ -323,24 +323,40 @@ <h3>This may take a while!</h3>
323323 let cacheStateNames = Object . keys ( cacheStates ) ;
324324 cacheStateNames . sort ( ) ;
325325
326- let yAxis = "Value" ;
326+ let yAxis = state . stat ;
327+ let yAxisUnit = null ;
327328 if ( state . stat == "instructions:u" ) {
328- yAxis = "Number of CPU instructions" ;
329+ yAxis = "CPU instructions" ;
330+ yAxisUnit = "count" ;
329331 } else if ( state . stat == "cycles:u" ) {
330- yAxis = "Number of CPU cycles" ;
332+ yAxis = "CPU cycles" ;
333+ yAxisUnit = "count" ;
331334 } 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" ;
333340 } else if ( state . stat == "wall-time" ) {
334- yAxis = "Wall time execution (seconds)" ;
341+ yAxis = "Wall time" ;
342+ yAxisUnit = "seconds" ;
335343 } else if ( state . stat == "max-rss" ) {
336- yAxis = "Maximum resident set size (kb)" ;
344+ yAxis = "Maximum resident set size" ;
345+ yAxisUnit = "kB" ;
337346 } else if ( state . stat == "faults" ) {
338347 yAxis = "Faults" ;
348+ yAxisUnit = "count" ;
339349 }
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" ;
342357 }
343358
359+ yAxis = yAxisUnit ? `${ yAxis } (${ yAxisUnit } )` : yAxis ;
344360 let yAxisLabel = i == 0 ? yAxis : null ;
345361
346362 let seriesOpts = [ { } ] ;
0 commit comments