Merge lp:~coreygoldberg/lp-dev-utils/ppr-access-parser into lp:lp-dev-utils
| Status: | Merged |
|---|---|
| Approved by: | j.c.sackett on 2012-08-16 |
| Approved revision: | 139 |
| Merged at revision: | 125 |
| Proposed branch: | lp:~coreygoldberg/lp-dev-utils/ppr-access-parser |
| Merge into: | lp:lp-dev-utils |
| Diff against target: |
447 lines (+227/-63) 4 files modified
page-perf_acccess.ini (+40/-0) page-performance-report.ini (+3/-0) page-performance-report.py (+3/-3) pageperformancereport.py (+181/-60) |
| To merge this branch: | bzr merge lp:~coreygoldberg/lp-dev-utils/ppr-access-parser |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| j.c.sackett (community) | Approve on 2012-08-16 | ||
| Robert Collins | 2012-08-13 | Pending | |
|
Review via email:
|
|||
Commit Message
give PPR (page-performan
Description of the Change
this branch is an enhancement to PPR (page-performan
when configured to run in "access log mode" (log_format=
Change Summary:
---------------
* added parser for apache access logs
* added new mandatory [parser] config section to ini.
takes option: (log_format=
* changed CSS links in HTML to relative URLs,
so we aren't harcoded to devpad.c.c.
* added new config/ini file for SSO/access logs:
* page-perf_
* tweaked inline css slightly, and switched to Ubuntu font
Notes:
------
* report generated from sample staging access log:
* https:/
* sample log for testing:
* https:/
* command-line example invoking page-performanc
against sample access log, using new ini and a defined
output directory:
$ python page-performanc
--config=
--directory=
--no-partition \
access_
- 131. By Corey Goldberg on 2012-08-13
-
use genex to convert to ints
- 132. By Corey Goldberg on 2012-08-14
-
updated ini and fixed url field in parser
- 133. By Corey Goldberg on 2012-08-14
-
updated example SSO config
- 134. By Corey Goldberg on 2012-08-15
-
updated ini with SSO categories
- 135. By Corey Goldberg on 2012-08-15
-
fixed regexes in .ini categories
- 136. By Corey Goldberg on 2012-08-15
-
fixed config for ppr
- 137. By Corey Goldberg on 2012-08-16
-
ini cleanup
| Corey Goldberg (coreygoldberg) wrote : | # |
thanks for looking over the code.
> #159 `create_
> I'm guessing this to facilitate not importing from zc
> unless you need it, but this seems like an unnecessary
> optimization that results in less clear code.
I am going to be using this code on servers that don't have zc libs installed.
| j.c.sackett (jcsackett) wrote : | # |
As discussed in IRC, given the apparent need to have this script support both functions and not require zc &c, if you just fix the other import issues and leave a comment indicating why this peculiarity exists and that if we separated these two utilities in some way we might be able to clean it up, we can call this good to go.
Thanks, Corey.
- 138. By Corey Goldberg on 2012-08-16
-
reordered imports and left XXX comment per MP comments
- 139. By Corey Goldberg on 2012-08-16
-
fixed comments
| Corey Goldberg (coreygoldberg) wrote : | # |
> fix the other import issues and leave a comment
> indicating why this peculiarity exists and that
> if we separated these two utilities in some way
> we might be able to clean it up
fixed imports and left comment. see updated branch/diff.
thanks!

Corey--
This looks like a good start, but there's some confusing and possibly
unnecessary code here, plus a few style issues.
#117: Looks like you've unordered the imports here, please reorder them
appropriately (e.g. alphabetically).
#159 `create_ request_ class` method seems unnecessary; as you know in
`parse_launchpad` or `parse_access` which format you're using, it would be
cleaner to just define two different classes instead and use the appropriate
one in the appropriate parse function. I'm guessing this to facilitate not
importing from zc unless you need it, but this seems like an unnecessary
optimization that results in less clear code.