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>
324324 cacheStateNames . sort ( ) ;
325325
326326 let yAxis = "Value" ;
327+ let yAxisUnit = null ;
327328 if ( state . stat == "instructions:u" ) {
328329 yAxis = "Number of CPU instructions" ;
329330 } else if ( state . stat == "cycles:u" ) {
330331 yAxis = "Number of CPU cycles" ;
331332 } else if ( state . stat == "cpu-clock" ) {
332- yAxis = "Wall time execution (seconds)" ;
333+ yAxis = "Wall time execution" ;
334+ yAxisUnit = "seconds" ;
333335 } else if ( state . stat == "wall-time" ) {
334- yAxis = "Wall time execution (seconds)" ;
336+ yAxis = "Wall time execution" ;
337+ yAxisUnit = "seconds" ;
335338 } else if ( state . stat == "max-rss" ) {
336- yAxis = "Maximum resident set size (kb)" ;
339+ yAxis = "Maximum resident set size" ;
340+ yAxisUnit = "kb" ;
337341 } else if ( state . stat == "faults" ) {
338342 yAxis = "Faults" ;
339343 }
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" ;
342351 }
343352
353+ yAxis = yAxisUnit ? `${ yAxis } (${ yAxisUnit } )` : yAxis ;
344354 let yAxisLabel = i == 0 ? yAxis : null ;
345355
346356 let seriesOpts = [ { } ] ;
You can’t perform that action at this time.
0 commit comments