Merge lp://staging/~vanvugt/mir/fix-1671033 into lp://staging/mir
Proposed by
Daniel van Vugt
Status: | Merged |
---|---|
Approved by: | Daniel van Vugt |
Approved revision: | no longer in the source branch. |
Merged at revision: | 4086 |
Proposed branch: | lp://staging/~vanvugt/mir/fix-1671033 |
Merge into: | lp://staging/mir |
Diff against target: |
33 lines (+7/-5) 2 files modified
tests/mir_test_doubles/fake_alarm_factory.cpp (+6/-4) tests/unit-tests/scene/test_mediating_display_changer.cpp (+1/-1) |
To merge this branch: | bzr merge lp://staging/~vanvugt/mir/fix-1671033 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alan Griffiths | Approve | ||
Mir CI Bot | continuous-integration | Approve | |
Review via email: mp+319784@code.staging.launchpad.net |
Commit message
Optimize a crazily inefficient test case (LP: #1671033)
Not a threading problem this time, but a general algorithmic complexity
problem. The test itself was running 50x longer than it needs to, and
the FakeAlarmFactory class it uses was copying a vector 3 million times during the one test case (now zero times).
Execution times under valgrind:
Before: 30 seconds; After: 0.7 seconds
Execution times natively:
Before: 0.8 seconds; After: 0.01 seconds
Description of the change
Note the above times are from a fast Xeon. CI logs show the test was taking minutes in CI.
To post a comment you must log in.
PASSED: Continuous integration, rev:4087 /mir-jenkins. ubuntu. com/job/ mir-ci/ 3148/ /mir-jenkins. ubuntu. com/job/ build-mir/ 4227 /mir-jenkins. ubuntu. com/job/ build-0- fetch/4314 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 4304 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial+ overlay/ 4304 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= zesty/4304 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= zesty/4254 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= zesty/4254/ artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial+ overlay/ 4254 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial+ overlay/ 4254/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= zesty/4254 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= zesty/4254/ artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 4254 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 4254/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 4254 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 4254/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial+ overlay/ 4254 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial+ overlay/ 4254/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /mir-jenkins. ubuntu. com/job/ mir-ci/ 3148/rebuild
https:/