Skip to content
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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

add BenchmarkTools integration #1

wants to merge 1 commit into from

Conversation

vchuravy
Copy link
Member

No description provided.

@@ -0,0 +1,15 @@
using BenchmarkTools
Copy link

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)
Copy link

@Zentrik Zentrik Aug 22, 2024

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()
Copy link

@Zentrik Zentrik Aug 22, 2024

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,
)
Copy link

@Zentrik Zentrik Aug 22, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants