question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Profile slow unit tests

See original GitHub issue

When 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
free-variationcommented, Apr 4, 2019

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

1reaction
diyclassicscommented, Apr 4, 2019

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found