Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up test by setting gem_details to false #200

Merged
merged 2 commits into from Feb 25, 2019
Merged

Conversation

kbaum
Copy link
Collaborator

@kbaum kbaum commented Feb 24, 2019

Noticed this test was taking up to 6 seconds so I added mini_test_profile and set gem_details to false.

Before:

TESTOPTS='--profile' bundle exec rake test
================================================================================
Your 10 Slowest Tests
================================================================================

 5.3751ms - RailsGemsFullStackTest#test_this_is_how_gem_it
 0.2883ms - FullStackTest#test_call_app_with_gem_tracking
 0.2372ms - FullStackTest#test_call_app
 0.1316ms - RailsFullStackTest#test_this_is_how_we_do_it
 0.0565ms - ResqueWorkerTest#test_resque_job_coverage
 0.0292ms - Coverband::WebTest#test_renders_index_content
 0.0241ms - ReportHTMLTest#test_generate_scov_html_report
 0.0108ms - Coverband::WebTest#test_collect_coverage
 0.0097ms - AtExitTest#test_only_registers_once
 0.0086ms - MiddlewareTest#test_always_be_enabled_with_sample_percentage_of_100

After:

TESTOPTS='--profile' bundle exec rake test
 0.8140ms - RailsGemsFullStackTest#test_this_is_how_gem_it
 0.3263ms - FullStackTest#test_call_app_with_gem_tracking
 0.2484ms - FullStackTest#test_call_app
 0.1244ms - RailsFullStackTest#test_this_is_how_we_do_it
 0.0883ms - ResqueWorkerTest#test_resque_job_coverage
 0.0321ms - ReportHTMLTest#test_generate_scov_html_report
 0.0307ms - Coverband::WebTest#test_renders_index_content
 0.0097ms - AtExitTest#test_only_registers_once
 0.0096ms - Coverband::WebTest#test_collect_coverage
 0.0076ms - ReportHTMLTest#test_generate_scov_report_file

@kbaum kbaum requested a review from danmayer February 24, 2019 20:59
@danmayer
Copy link
Owner

Nice also shows how expensive that feature can be something to be careful with.

@danmayer danmayer closed this Feb 24, 2019
@danmayer danmayer reopened this Feb 24, 2019
@danmayer
Copy link
Owner

Blah I can't merge right now because of the decrease in coverage. Feel free to merge or I will once I am at a real computer, on phone now

@kbaum
Copy link
Collaborator Author

kbaum commented Feb 25, 2019

I think the extra time probably just comes from viewing the report with all the detail?

@kbaum kbaum merged commit 54ca133 into master Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants