Merge lp:~abentley/launchpad/estimate-duration into lp:launchpad
Status: | Merged |
---|---|
Merged at revision: | 10920 |
Proposed branch: | lp:~abentley/launchpad/estimate-duration |
Merge into: | lp:launchpad |
Diff against target: |
130 lines (+51/-9) 4 files modified
lib/lp/code/model/sourcepackagerecipe.py (+14/-1) lib/lp/code/model/sourcepackagerecipebuild.py (+4/-2) lib/lp/code/model/tests/test_sourcepackagerecipe.py (+22/-2) lib/lp/code/model/tests/test_sourcepackagerecipebuild.py (+11/-4) |
To merge this branch: | bzr merge lp:~abentley/launchpad/estimate-duration |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Hummer (community) | code | Approve | |
Review via email: mp+25553@code.launchpad.net |
Commit message
Provide a data-based estimateDuration.
Description of the change
= Summary =
Fix bug #507764: Need proper SourcePackageRe
== Proposed fix ==
For sourcepackagere
median of those durations. The status of the these builds is not considered,
so if builds of this recipe always fail, this will estimate how long it will
take to fail.
Using the median means that extreme values will not unduly influence the
estimate.
If there are no builds with durations, the estimate is 10 minutes, which is a
reasonable value for small packages.
== Pre-implementation notes ==
bigjools impressed the importance of this bug upon me. Mid-implementation with
rockstar re: status
== Implementation details ==
This implements SourcePackageRe
calculation, and then implements estimateDuration on top of it.
Where the number of values is even, this is not a true median, because it takes
the lower-middle value instead of combining the lower-middle and higher-middle
values.
There are some small drive-by fixes, as well.
== Tests ==
bin/test -t estimateDuration -t getMedian test_sourcepack
== Demo and Q/A ==
Request a build. The estimated duration should start at 10 minutes.
Request a second build. The estimated duration should be the actual previous
duration.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/