Closed jsierles closed 4 years ago
Right now: Not really. I'm open to some kind of integration though. For me personally I've just written my own scripts in a scratch.rb file and hit it manually. For example forcing a sidekiq job to run in the foreground and wrapping it in stackprof/memoryprofiler/etc.
I did something similar; created a new endpoint that triggered the worker job that I wanted to profile.
The way derailed works is we wrap a method:
In theory you could do something like this in your perf.rake
case ENV['DERAILED_BACKGROUND_PROFILE']
when 'sidekiq_job_one'
def call_app
hash = { stuff: "here" }
SideKiqJobOne.new(hash).perform_now
end
else
puts "Profiling #{ENV['PATH_TO_HIT']}"
end
Is there a way currently to boot a Rails app but not hit any endpoints, instead opting for running specific code paths like a Sidekiq background job?