Profile slow unit tests
See original GitHub issueWhen watching the builds, I have long noticed several very slow tests. Don’t know which of these it is or the cause – either a slow download or actual computation. That is, when the progress “dots” “walk” across the screen: https://travis-ci.org/cltk/cltk/jobs/514967233#L1919
To check for test times, here is a resource (note to self or whoever takes this up): install nose-timer (https://pypi.org/project/nose-timer/) and add --with-timer
flag to nosetests
the command.
Coming from #895 and #896 , which tried to help by telling Travis to cache directories. In these tests, I did not cache the ~/nltk_data
dir, so this could be something to try as well, if in fact it is downloads slowing things.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12 (8 by maintainers)
Top Results From Across the Web
How to profile slow-running unit tests? - MSDN - Microsoft
I've got some C# .net unit tests that take a very long time to run in Visual Studio 2012. I'd like to run...
Read more >5-Step Strategy for Optimizing Slow Tests - Semaphore CI
A framework for making slow tests fast ; Identify: which tests are bad performers. ; Prioritize: pick a batch of the slowest tests....
Read more >Profile a Unit Test in Visual Studio Fails with "File contains no ...
Got a test that is running slow and you want to find out why? Go to Test Explorer, right-click that test and choose...
Read more >"profiling" a slow pitest run: how to make PIT faster
I was wondering if there is a way to profile a particularly slow running Pitest. I have a project we are refactoring to...
Read more >Slow Tests at XUnitPatterns.com
Slow Tests can be caused by either the way the SUT is built and tested or by the way the tests are designed....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The difference in performance between the build and running tests locally might be related to the resources of the VM, e.g. slow I/O, at travis-ci.org
@free-variation Yes, good catch. The commit above adds the transcriber to setUpClass—in the short run this strategy may be a useful/worthwhile on for speeding up the travis builds.