TimerOutputComparisons.jl - plotting TimerOutput

Sometimes it’s useful to visually compare a bunch of TimerOutput objects. In my case, this was for profiling code running on different numbers of cores, but maybe also for example comparing different versions of a code. I made a small package TimerOutputComparisons.jl to make this easier.

There is a function save_timer(filename, to) to save a TimerOutput to to a .jld file. After doing that for some runs on different numbers of cores, running

julia> using TimerOutputComparisons, TimerOutputs

julia> compare_timers(["timing-1-1.jld", "timing-2-2.jld", "timing-4-4.jld", "timing-8-8.jld", "timing-16-16.jld"]...; use_data=:time, legend=false, averages=true, root="Static condensation ldiv! 16641")

produces a plot like this, where I’ve disabled the legend because there are too many lines, but a GLMakie DataInspector gives a tooltip that shows which timer each line corresponds to:

(I have some more work to do to optimise the performance scaling :laughing: )

If anyone else would find this useful, I could register the package?

1 Like