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

README should mention low overhead #65

Open
spuyet opened this issue Apr 21, 2024 · 2 comments
Open

README should mention low overhead #65

spuyet opened this issue Apr 21, 2024 · 2 comments

Comments

@spuyet
Copy link

spuyet commented Apr 21, 2024

Hello, this is more a question than an issue but there is nothing related to the performance overhead added by vernier on a ruby program, did someone made a benchmark or something like that already ?

@jhawthorn
Copy link
Owner

jhawthorn commented Apr 21, 2024

It's hard to give a specific number, since there are a variety of factors. Vernier is a sampling profiler so we expect the overhead to be very low (and based on the sample rate set).

I did commit examples/measure_overhead.rb the first test of which shows that as expected there is almost no overhead:

$ ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
Warming up --------------------------------------
         no profiler   737.000 i/100ms
             vernier   725.000 i/100ms
Calculating -------------------------------------
         no profiler      7.374k (± 0.4%) i/s -     37.587k in   5.096970s
             vernier      7.275k (± 0.2%) i/s -     36.975k in   5.082242s

Comparison:
         no profiler:     7374.5 i/s
             vernier:     7275.4 i/s - 1.01x  slower

The other tests in that file show that there is overhead associated with the optional allocation_sample_rate tracing (partly because that makes the VM take a slow path, partly just because of the cost to record the samples).

I'll leave this open as a reminder that I want to mention something in the README

@jhawthorn jhawthorn changed the title Impact on performances ? README should mention low overhead Apr 21, 2024
@spuyet
Copy link
Author

spuyet commented May 6, 2024

Nice, thx for the benchmark, I will give it a try in production and see how it goes then :)

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

2 participants