Closed AlexanderSinn closed 3 months ago
LGTM. But there are a few clang-tidy warnings that need to be fixed.
@AlexanderSinn This is great!
I was wondering why tiny_profiler.print_threshold = 1
is just a boolean switch and not an actual threshold value (e.g., 0.95
would be: the sum of all earlier values is 95% of all runtime)? Would this be a good update?
It's not bool, it's double.
Ah, makes sense. Read the PR description details now.
Summary
In this PR, an option is added to shorten the output from TinyProfiler at the end of a simulation.
With the current approach,
tiny_profiler.print_threshold
specifies the maximum inclusive runtime that the "Other" section can take in percent relative to the total runtime. The default value is 1 (=1%), which results in at least 99% of the total inclusive and exclusive time still being profiled outside "Other". In the exclusive section, the same functions are combined into "Other" as in the inclusive section. This has the effect that a given function will either show up in both or neither of the sections. But this also means that functions such as "main()" with a large inclusive but short exclusive runtime will still show up in the exclusive section, even though functions with longer exclusive runtime might have been put into "Other".Additional background
HiPACE++ TinyProfiler output with
tiny_profiler.print_threshold = 1.
:HiPACE++ TinyProfiler output with
tiny_profiler.print_threshold = 0
(off):Checklist
The proposed changes: