jhawthorn / vernier

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

Add vernier CLI #15

Closed jhawthorn closed 1 year ago

jhawthorn commented 1 year ago

Based heavily on the stackprof CLI + @tenderlove's signal-based toggling

$ bin/vernier --help
Usage: vernier run [FLAGS] -- COMMAND

FLAGS:
        --output [FILENAME]          output filename
        --interval [MICROSECONDS]    sampling interval (default 500)
        --signal [NAME]              specify a signal to start and stop the profiler
        --start-paused               don't automatically start the profiler

$ bin/vernier run --output profile.json --interval=1000 -- ruby -e 'sleep 1'
starting profiler with interval 1000
profile written to profile.json