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

More generic profiler support (eflambe in particular) #440

Open
PragTob opened this issue Nov 27, 2024 · 0 comments
Open

More generic profiler support (eflambe in particular) #440

PragTob opened this issue Nov 27, 2024 · 0 comments

Comments

@PragTob
Copy link
Member

PragTob commented Nov 27, 2024

I saw a cool talk at Code BEAM EU about performance optimizations and the 1 billion row challenge by @rajrajhans and he used eflambe for profiling.

So the question was... why not add support for more profilers? Right now we only support built-in profilers.

In true benchee mannerism though I'd want it to be more generic:

  • no hard dependency on eflambe, most likely not even an optional one - point to a plugin
  • since it's a plugin, we'd need to design a behavior (just like for formatters) to conform with for "profiling plugins"

likely similiar to the interface of the built-in profilers which we already support: https://hexdocs.pm/mix/Mix.Tasks.Profile.Tprof.html

I'd expect that interface to be quite simple, but I'm not looking deeply into it just now :) Here is where/how we currently use them: https://github.com/bencheeorg/benchee/blob/main/lib/benchee/profile.ex#L109

https://github.com/bencheeorg/benchee/blob/main/lib/benchee/benchmark/collect/profile.ex

It boils down to:

    return_value = profiler_module.profile(function, profiler_opts)

With that we could also remove our reliance on the mix tasks (I'm unsure how much benefit they give us over calling the profilers themselves).

@PragTob PragTob mentioned this issue Nov 27, 2024
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

No branches or pull requests

1 participant