Merge lp://staging/~ev/ubuntu-ci-services-itself/time-sorted-tests into lp://staging/ubuntu-ci-services-itself

Proposed by Evan
Status: Merged
Approved by: Evan
Approved revision: 410
Merged at revision: 402
Proposed branch: lp://staging/~ev/ubuntu-ci-services-itself/time-sorted-tests
Merge into: lp://staging/ubuntu-ci-services-itself
Diff against target: 213 lines (+122/-7)
7 files modified
bin/test_time_sorted_tests.py (+32/-0)
bin/time_sorted_tests.py (+67/-0)
branch-source-builder/bsbuilder/tests/test_upload.py (+3/-1)
branch-source-builder/bsbuilder/tests/test_v1.py (+3/-1)
ci-utils/ci_utils/image_store/tests/test-image-store.py (+6/-1)
ci-utils/ci_utils/tests/test_amqp.py (+3/-3)
lander/lander/tests/test_archiver.py (+8/-1)
To merge this branch: bzr merge lp://staging/~ev/ubuntu-ci-services-itself/time-sorted-tests
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve
Chris Johnston (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+211231@code.staging.launchpad.net

Commit message

Shave two minutes off test execution. Add a small program to print sorted test execution time.

Description of the change

The kinds of things one discovers while on a ten hour flight. This branch knocks our worst case test time under ./run-tests from 2 minutes 12 seconds to 10 seconds. A few tests were setting up nonexistent hosts to talk to, then waiting for the socket timeout:

trunk:
Ran 289 tests in 133.913s
Ran 289 tests in 132.474s
Ran 289 tests in 132.500s

time-sorted-tests:
Ran 289 tests in 10.384s
Ran 289 tests in 10.727s
Ran 289 tests in 10.676s

It also adds a small tested program to sort the tests by their execution time, which was helpful in identifying long running tests. We should run this periodically (say as part of the MP review toolbelt) to ensure that our ability to iterate quickly isn't slowed by our growing test coverage.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:410
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/441/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/441/rebuild

review: Approve (continuous-integration)
Revision history for this message
Chris Johnston (cjohnston) wrote :

Took the tarmac time for me running it locally from 4:14 to 2:49... I like
that. :-) faster == better

I'm not a huge fan of the commenting for the mocks.. We don't do those
types of comments elsewhere, but thats just my thoughts..

 review approve

review: Approve
Revision history for this message
Andy Doan (doanac) wrote :

The whole "bin" idea is quite interesting. I've been thinking there are a few scripts we have that should get moved there.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: