Code Monkey home page Code Monkey logo

Comments (2)

M0ses avatar M0ses commented on July 30, 2024

What is the definition of "slow"?
Would you like to track it down to test cases (functions or methods) or classes(e.g. HgTests)?

I want to help but i do not understand the goal fully.

I did a trace which test classes take most of the time:

########## UnitTestCases
.............ss....s..
----------------------------------------------------------------------
Ran 22 tests in 0.078s

OK (skipped=3)
0.37user 0.06system 0:00.47elapsed 91%CPU (0avgtext+0avgdata 27316maxresident)k
4640inputs+0outputs (1major+10419minor)pagefaults 0swaps
########## TasksTestCases
.........
----------------------------------------------------------------------
Ran 9 tests in 0.047s

OK
0.32user 0.03system 0:00.36elapsed 98%CPU (0avgtext+0avgdata 26024maxresident)k
232inputs+8outputs (0major+5434minor)pagefaults 0swaps
########## SCMBaseTestCases
.
----------------------------------------------------------------------
Ran 1 test in 0.004s

OK
0.26user 0.03system 0:00.30elapsed 99%CPU (0avgtext+0avgdata 25680maxresident)k
8inputs+0outputs (0major+5368minor)pagefaults 0swaps
########## GitTests
.........................................................
----------------------------------------------------------------------
Ran 57 tests in 26.869s

OK
15.70user 11.71system 0:27.34elapsed 100%CPU (0avgtext+0avgdata 34408maxresident)k
21025inputs+102040outputs (12major+3756229minor)pagefaults 0swaps
########## SvnTests
..........................................
----------------------------------------------------------------------
Ran 42 tests in 66.416s

OK
31.56user 12.04system 1:06.85elapsed 65%CPU (0avgtext+0avgdata 41508maxresident)k
12568inputs+247448outputs (27major+3559449minor)pagefaults 0swaps
########## HgTests
..................................
----------------------------------------------------------------------
Ran 34 tests in 76.240s

OK
63.75user 11.45system 1:16.60elapsed 98%CPU (0avgtext+0avgdata 29988maxresident)k
0inputs+35328outputs (0major+4090705minor)pagefaults 0swaps

from obs-service-tar_scm.

aspiers avatar aspiers commented on July 30, 2024

What is the definition of "slow"?

For a test case, I guess anything longer than 0.5s or so.

Would you like to track it down to test cases (functions or methods) or classes(e.g. HgTests)?

Test cases, definitely. E.g. if HgTests had (say) 20 tests taking 0.1s each, and 2 tests taking 10s each then there would normally be no good reason to skip the quick tests because they only take 2s in total. There would be a separate reason for optionally skipping all tests for a particular SCM, e.g. if you don't have hg or bzr installed, but that is a different scenario which should not be confused with this issue of slow tests.

So as in the original description here, what is needed is a decorator for marking which tests are slow, which also provides an easy way of skipping those tests, e.g. via CLI option or environment variable.

from obs-service-tar_scm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.