Skip to content

Instantly share code, notes, and snippets.

@tgxworld
Last active August 29, 2015 14:04
Show Gist options
  • Save tgxworld/109bf9c5a45b1a986fea to your computer and use it in GitHub Desktop.
Save tgxworld/109bf9c5a45b1a986fea to your computer and use it in GitHub Desktop.
Comparison of runtime between Controllers and Integration Tests. Duplicated test case 10 times to simulate a larger test suite.
# Logging Enabled
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time for i in {1..100}; do rake test:controllers; done;
real 7m47.588s
user 7m14.987s
sys 0m23.319s
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time for i in {1..100}; do rake test:integration; done;
real 8m25.046s
user 7m51.508s
sys 0m24.071s
# Logging Disabled
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time for i in {1..100}; do rake test:controllers; done;
real 7m15.452s
user 6m45.995s
sys 0m19.915s
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time for i in {1..100}; do rake test:integration; done;
real 7m54.211s
user 7m23.826s
sys 0m20.610s
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time rake test:controllers
Run options: --seed 20971
# Running:
....................................................................................................
Finished in 3.312826s, 30.1857 runs/s, 676.1598 assertions/s.
100 runs, 2240 assertions, 0 failures, 0 errors, 0 skips
real 0m4.628s
user 0m4.303s
sys 0m0.233s
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time rake test:integration
Run options: --seed 26004
# Running:
....................................................................................................
Finished in 3.830118s, 26.1089 runs/s, 584.8383 assertions/s.
100 runs, 2240 assertions, 0 failures, 0 errors, 0 skips
real 0m5.111s
user 0m4.776s
sys 0m0.241s
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time rake test:controllers
Run options: --seed 62995
# Running:
....................................................................................................
Finished in 3.079742s, 32.4703 runs/s, 727.3337 assertions/s.
100 runs, 2240 assertions, 0 failures, 0 errors, 0 skips
real 0m4.385s
user 0m4.087s
sys 0m0.204s
guoxiang@guoxiang-GS60-2PC-Ghost rails-contributors (master) $ time rake test:integration
Run options: --seed 16933
# Running:
....................................................................................................
Finished in 3.516242s, 28.4395 runs/s, 637.0438 assertions/s.
100 runs, 2240 assertions, 0 failures, 0 errors, 0 skips
real 0m4.808s
user 0m4.503s
sys 0m0.209s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment