Merge lp:~gmb/launchpad/stored-proc-for-bug-heat-bug-582195 into lp:launchpad/db-devel
| Status: | Superseded |
|---|---|
| Proposed branch: | lp:~gmb/launchpad/stored-proc-for-bug-heat-bug-582195 |
| Merge into: | lp:launchpad/db-devel |
| Diff against target: |
154 lines (+150/-0) 1 file modified
database/schema/pending/stored-proc-for-bug-heat.sql (+150/-0) |
| To merge this branch: | bzr merge lp:~gmb/launchpad/stored-proc-for-bug-heat-bug-582195 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Björn Tillenius | db | 2010-05-26 | Pending |
| Stuart Bishop | db | 2010-05-26 | Pending |
| Canonical Launchpad Engineering | code | 2010-05-26 | Pending |
|
Review via email:
|
|||
This proposal has been superseded by a proposal from 2010-05-26.
Commit Message
A stored procedure has been added for calculating bug heat in the database rather than in code.
Description of the Change
This branch takes the code in lib/lp/
The idea behind this is that we need to do bug heat calculations in the DB rather than in code, since the setup and teardown surrounding doing the calculations in code is far to slow and cumbersome.
The stored procedure is currently not hooked up to anything, but once the patch is applied it's easy to check the results of the stored procedure against the existing code using psql and an iharness session, thus:
In psql:
SELECT calculate_
In iharness:
>>> from lp.bugs.
>>> bug_1 = getUtility(
>>> calculator = BugHeatCalculat
>>> calculator.
| Björn Tillenius (bjornt) wrote : | # |
| Graham Binns (gmb) wrote : | # |
2010/5/26 Björn Tillenius <email address hidden>:
> On Wed, May 26, 2010 at 10:50:49AM -0000, Graham Binns wrote:
>> The stored procedure is currently not hooked up to anything, but once
>> the patch is applied it's easy to check the results of the stored
>> procedure against the existing code using psql and an iharness session,
>> thus:
>
> Why not hook it up directly? It would be useful to have this tested,
> since it's hard to check that it's doing what it should be doing.
>
I was going to do it in a subsequent branch, but since it's now late
in stub's day anyway I'll do it in this one and resubmit.
--
Graham Binns | PGP Key: EC66FA7D

On Wed, May 26, 2010 at 10:50:49AM -0000, Graham Binns wrote:
> The stored procedure is currently not hooked up to anything, but once
> the patch is applied it's easy to check the results of the stored
> procedure against the existing code using psql and an iharness session,
> thus:
Why not hook it up directly? It would be useful to have this tested,
since it's hard to check that it's doing what it should be doing.
-- /launchpad. net/~bjornt
Björn Tillenius | https:/