Merge lp:~bigkevmcd/offspring/build-stats-for-project-group into lp:offspring
Proposed by
Kevin McDermott
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 116 | ||||
Proposed branch: | lp:~bigkevmcd/offspring/build-stats-for-project-group | ||||
Merge into: | lp:offspring | ||||
Prerequisite: | lp:~bigkevmcd/offspring/non-scheduled-builds | ||||
Diff against target: |
141 lines (+77/-7) 2 files modified
lib/offspring/web/queuemanager/metrics.py (+19/-7) lib/offspring/web/queuemanager/tests/test_metrics.py (+58/-0) |
||||
To merge this branch: | bzr merge lp:~bigkevmcd/offspring/build-stats-for-project-group | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guilherme Salgado | Needs Fixing | ||
Offspring Committers | Pending | ||
Review via email: mp+85627@code.launchpad.net |
Description of the change
This adds functionality allowing the metrics to be gathered per project group.
To post a comment you must log in.
You don't seem to use seconds_into_time() anywhere, so I'd just remove it and re-add in whichever branch needs it, if there is one.
I'd have made get_average_time() raise an error if the client passes both a project and a project_group, but given that the docstring states what will happen in that case it's no big deal, so go with whichever you prefer
Here you also use the factory to create a build result and right after it you set its started_ at/finished_ at attributes, which can now be removed as the factory method should take those attributes as arguments (from the fix you did in your previous branch ;)
The docstring of test_get_ average_ build_time_ with_excludes_ projects_ not_in_ group(self) is identical to that of the previous test method:
140 + """
141 + All Projects in a ProjectGroup should be included in the average
142 + buildtime.
143 + """