Skip to content

Instantly share code, notes, and snippets.

@tgxworld
Last active August 29, 2015 14:04
Show Gist options
  • Save tgxworld/2ec7205374ff294557f4 to your computer and use it in GitHub Desktop.
Save tgxworld/2ec7205374ff294557f4 to your computer and use it in GitHub Desktop.
Comparison of runtime between Controllers and Integration Tests.
# Logging Enabled
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time for i in {1..100}; do rake test:controllers; done;
real 2m59.920s
user 2m39.629s
sys 0m16.733s
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time for i in {1..100}; do rake test:integration; done;
real 3m5.075s
user 2m44.631s
sys 0m16.883s
# Logging Disabled
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time for i in {1..100}; do rake test:controllers; done;
real 2m57.280s
user 2m37.465s
sys 0m16.291s
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time for i in {1..100}; do rake test:integration; done;
real 3m1.743s
user 2m41.746s
sys 0m16.413s
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time rake test:controllers
Run options: --seed 42526
# Running:
..........
Finished in 0.529427s, 18.8883 runs/s, 423.0987 assertions/s.
10 runs, 224 assertions, 0 failures, 0 errors, 0 skips
real 0m1.828s
user 0m1.621s
sys 0m0.171s
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time rake test:integration
Run options: --seed 35423
# Running:
..........
Finished in 0.604293s, 16.5483 runs/s, 370.6809 assertions/s.
10 runs, 224 assertions, 0 failures, 0 errors, 0 skips
real 0m1.856s
user 0m1.651s
sys 0m0.171s
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time rake test:controllers
Run options: --seed 27717
# Running:
..........
Finished in 0.465484s, 21.4830 runs/s, 481.2199 assertions/s.
10 runs, 224 assertions, 0 failures, 0 errors, 0 skips
real 0m1.740s
user 0m1.546s
sys 0m0.161s
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time rake test:integration
Run options: --seed 19470
# Running:
..........
Finished in 0.495095s, 20.1982 runs/s, 452.4388 assertions/s.
10 runs, 224 assertions, 0 failures, 0 errors, 0 skips
real 0m1.742s
user 0m1.550s
sys 0m0.161s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment