Merge lp://qastaging/~michael.nelson/launchpad/588288-log-parser-dont-read-entire-file into lp://qastaging/launchpad
Proposed by
Michael Nelson
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Graham Binns | ||||||||
Approved revision: | no longer in the source branch. | ||||||||
Merged at revision: | 10942 | ||||||||
Proposed branch: | lp://qastaging/~michael.nelson/launchpad/588288-log-parser-dont-read-entire-file | ||||||||
Merge into: | lp://qastaging/launchpad | ||||||||
Diff against target: |
167 lines (+67/-13) 4 files modified
configs/testrunner/launchpad-lazr.conf (+1/-0) lib/canonical/config/schema-lazr.conf (+4/-0) lib/lp/services/apachelogparser/base.py (+30/-11) lib/lp/services/apachelogparser/tests/test_apachelogparser.py (+32/-2) |
||||||||
To merge this branch: | bzr merge lp://qastaging/~michael.nelson/launchpad/588288-log-parser-dont-read-entire-file | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email:
|
Commit message
log parser please don't read entire file into memory.
Description of the change
This branch fixes bug 588288, which was identified after running the ppa log parser for the first time (bug 139855).
It does two things:
1) Refactors the parse_file() function so that it does not read the entire remaining file contents to be parsed into memory (lines = fd.readlines()).
2) Allows an optional config logparser_
No lint. To test:
bin/test -vvm test_apachelogp
To post a comment you must log in.