Profiler-related cucumber testing issue.
One of our cucumber tests is pretty slow. Instead of guessing where our application spends time, I would like to know programmatically.
How to run a cucumber test using a profiler?
What does not work:
$ URL=/projects/by/114951412
$ script/performance/profiler 'app.get "$URL"' 50
This does not work because "app.get" only works in the console and is not available for the profiler script
$ EXPENSIVE_METHOD="Project.find('6300003243').aggregated_total_amount"
$ script/performance/profiler "$EXPENSIVE_METHOD" 50
This gives the result, but I have to guess that this method is a bottleneck
(I use cucumber 0.3.94, rails 2.3.2, ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.6.0])
source
share