File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -636,6 +636,21 @@ function Base.show(io::IO, stats::Stats)
636636 @printf (io, " # %4.1f cycles per ns" , counter. value / counter. running)
637637 elseif name == " instructions" && haskey (stats, " cpu-cycles" )
638638 @printf (io, " # %4.1f insns per cycle" , scaledcount (counter) / scaledcount (stats[" cpu-cycles" ]))
639+ elseif name == " cpu-clock" || name == " task-clock"
640+ clk = float (scaledcount (counter))
641+ if clk ≥ 1e9
642+ clk /= 1e9
643+ unit = " s"
644+ elseif clk ≥ 1e6
645+ clk /= 1e6
646+ unit = " ms"
647+ elseif clk ≥ 1e3
648+ clk /= 1e3
649+ unit = " μs"
650+ else
651+ unit = " ns"
652+ end
653+ @printf (io, " # %4.1f %s" , clk, unit)
639654 else
640655 for (num, den, label) in [
641656 (" stalled-cycles-frontend" , " cpu-cycles" , " cycles" ),
You can’t perform that action at this time.
0 commit comments