-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add BenchmarkTools integration #1
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,15 @@ | |||
using BenchmarkTools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been a while since I touched this code, but don't think you need this.
|
||
@inline function posthook(id) | ||
Valgrind.Callgrind.stop_instrumentation() | ||
Valgrind.Callgrind.dump_stats_at(id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing you want dump_stats_at
in the sample_result
hook instead if you're trying to store the result of dump_stats_at
as part of your benchmark results.
@reexport using BenchmarkTools | ||
|
||
@inline function prehook() | ||
Valgrind.Callgrind.zero_stats() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could move zero_stats
into the setup_prehook
just so it's more isolated from the code being benchmarked, i.e. its not part of the function at https://github.com/Zentrik/BenchmarkTools.jl/blob/a77bfca26390681d889460366cb9980ba36103c9/src/execution.jl#L656-L666
prehook = prehook, | ||
posthook = posthook, | ||
enable_customizable_func = :ALL, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't want to run the normal benchmarking BenchmarkTools does you can set run_customizable_func_only
to true.
No description provided.