-
-
Notifications
You must be signed in to change notification settings - Fork 494
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 stackprof based profiler #2024
Conversation
2b18591
to
870a751
Compare
2bba702
to
4a747e8
Compare
4a747e8
to
0f8a58f
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #2024 +/- ##
==========================================
+ Coverage 98.58% 98.60% +0.01%
==========================================
Files 157 159 +2
Lines 10127 10506 +379
==========================================
+ Hits 9984 10359 +375
- Misses 143 147 +4
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
7c61c0f
to
07faa7e
Compare
09ea283
to
39eda29
Compare
2a9245d
to
6b206c8
Compare
6b206c8
to
e99575b
Compare
This reverts commit e99575b.
f1dc5dd
to
cfd931e
Compare
d368ef1
to
e7def50
Compare
e7def50
to
207fc04
Compare
alright I believe I covered all the comments, @st0012 |
64c3223
to
d84ae71
Compare
d84ae71
to
227e5d3
Compare
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.
IMO using null-object pattern here is an overkill.
Give that:
- All public profiler APIs no-op if not
@sampled
@sampled
will never betrue
unless@profiling_enabled
Can we do this instead?
- Define a single
Profiler
class - In
Profiler
's constructor, we use:
@profiling_enabled = defined?(StackProf) && configuration.profiling_enabled?
Alternatively, I think just early returning the initialize
method may also work.
a7f0689
to
ec0a24f
Compare
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.
Amazing 🎉
ok I did one more round of sanity check testing, looks ok. I'm merging! |
resolves #2013
Usage
stackprof
toGemfile
as a peer dependency