jhawthorn / vernier

📏 next generation CRuby profiler
https://vernier.prof/
MIT License
837 stars 20 forks source link

Add custom markers #64

Open tagirahmad opened 7 months ago

tagirahmad commented 7 months ago

Hi 👋🏻 It's it possible to add custom markers in Market Chart?

It looks like it possible use add_marker method, but here's no any example of using it.

jhawthorn commented 7 months ago

It is possible, but I'll admit the API is currently a little awkward and it requires a reference to the current profile object.

Another option for adding markers (for those whose projects it's compatible with) is to add hooks: [:rails] to the profile and then to instrument whatever is of interest with ActiveSupport::Notifications