Merge lp://staging/~gary/launchpad/lsprof-on-demand into lp://staging/launchpad
Status: | Merged |
---|---|
Approved by: | Robert Collins |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11465 |
Proposed branch: | lp://staging/~gary/launchpad/lsprof-on-demand |
Merge into: | lp://staging/launchpad |
Diff against target: |
1324 lines (+840/-215) 11 files modified
.bzrignore (+1/-0) configs/development/apidoc-configure-normal.zcml (+6/-0) configs/development/launchpad-lazr.conf (+3/-0) lib/canonical/config/schema-lazr.conf (+8/-2) lib/canonical/launchpad/doc/profiling.txt (+109/-175) lib/canonical/launchpad/icing/style-3-0.css.in (+28/-1) lib/canonical/launchpad/webapp/errorlog.py (+16/-12) lib/lp/services/profile/configure.zcml (+7/-2) lib/lp/services/profile/profile.pt (+77/-0) lib/lp/services/profile/profile.py (+131/-23) lib/lp/services/profile/tests.py (+454/-0) |
To merge this branch: | bzr merge lp://staging/~gary/launchpad/lsprof-on-demand |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Approve | ||
Review via email:
|
Commit message
add profiling-in-demand via a ++profile++ URL hook
Description of the change
= Intro =
This branch adds profiling-in-demand via a ++profile++ URL hook, like ++debug++ and ++oops++.
To test, run ``./bin/test -vvm lp.services.
To QA (please do), go to a URL like https:/
This is a significantly over-large diff. I'm sorry. Suggestions on how I could have divided it up are welcome. Requests to actually do so will be acted upon. :-)
I did get Curtis to review and approve some individual parts of this work. I will identify these below.
= Lint =
./configs/
96: Line exceeds 78 characters.
115: Line exceeds 78 characters.
126: Line exceeds 78 characters.
./lib/
493: Line exceeds 78 characters.
975: Line exceeds 78 characters.
I brought these up with Curtis. He said not to change them. He is adjusting the linter to ignore over-long lines in these files.
./lib/
LOTSA LINES: Line exceeds 78 characters.
I started looking at these many lines. Some of them were example URLs. Others were comments following some sort of regular pattern. I decided I really didn't want to touch that. None of the lines are mine, in any case.
./lib/
6: junk after document element
This is a file of an HTML snippet. I assume that's why the linter is unhappy. Is it what it is.
= File-by-File Comments =
.bzrignore
The new addition is the output of chameleon, a page template
implementation to which we plan to switch, and which I used because it
was convenient for a template.
configs/
This adds the revised file to the apidoc Books section.
configs/
As is explained in other files, this means that profiling is allowed
with the ++profile++ url segment in development.
lib/canonical/
(No comment)
lib/canonical/
I converted this to ReST and tried to make the parts of the document that
described the pieces I was changing more like an end-user help document.
The actual tests here are now part of the new unit tests.
lib/canonical/
Curtis has reviewed and approved of the placement and abstract content of
this CSS (though he did not see the actual visual result).
lib/canonical/
Most of the changes in this file are to make lint happy.
The ony real changes are that calling "raising" and "handling" returns the
generated OOPS. That has handy and seemed reasonable.
lib/lp/
I don't need the "for" lines because I do the declaration in-line in the
Python now.
lib/lp/
This is a raw Chameleon page template. These templates have Python expressions as their default, which was convenient.
lib/lp/
The comments in get_desired_
the more unusual choices I made.
lib/lp/
I appear to have gotten tired of writing docstrings for the tests towards
the end. I'm not sure if we require them. Lemme know if you want them.
I tried to make the method names descriptive enough.
This is awesome, thanks for doing it. We discussed some stuff on IRC, but its all future-stuff. +1