-
Notifications
You must be signed in to change notification settings - Fork 32
Profiling
Sean edited this page Mar 6, 2017
·
18 revisions
- gem detailed_benchmarks
- gem memory_profiler
- gem mini-profiler
https://github.com/schneems/derailed_benchmarks
To see gem memory usage
bundle exec derailed bundle:mem
Runtime memory usage for the app
bundle exec derailed bundle:objects
Convert to MB. Example crowdAI's gems use 105.59MB for gems alone.
https://github.com/presidentbeef/brakeman
Using the derailed_benchmarks gem, run increasing numbers of tests. If the memory usage is not stable there is a leak.
TEST_COUNT=5000 bundle exec derailed exec perf:mem_over_time
TEST_COUNT=10_000 bundle exec derailed exec perf:mem_over_time
TEST_COUNT=20_000 bundle exec derailed exec perf:mem_over_time