zombocom/derailed_benchmarks

How to run derailed in a Rake Task or a Test

Closed this issue · 1 comments

I'm trying to test cpu/memory/gc/etc consumption in some workers that I usually run in a rake task. I created a stress test with the code to test but I would like to use derailed_benchmark to get more info.

Is there anyway to do it?

Derailed is implemented internally as rake tasks. You should be able to load up the appropriate file and execute them, though I would recommend shelling out to bundle exec derailed as the internal interfaces are not stable.

https://github.com/schneems/derailed_benchmarks/blob/master/lib/derailed_benchmarks/tasks.rb