Closed Bug 793630 Opened 12 years ago Closed 12 years ago

Clean up GeneralErrorFilter.php matchLine() regexes & optimise order

Categories

(Tree Management Graveyard :: TBPL, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 2 obsolete files)

The regex in GeneralErrorFilter.php contains unnecessary escaping of colons, omits '^' in cases where we could add it to improve performance and could be re-ordered in most to least likely, such that we don't check for half a dozen cases before 'TEST-UNEXPECTED-', which is our most frequent failure case. (Although given we search per line for each regex, rather than all lines using one regex and then onto the next; I guess the latter won't save us much other than for the rare 'thousands of TEST-UNEXPECTED-FAILs' case). I can't seem to remember seeing instances covered by: > || preg_match("/ error\([0-9]*\)\:/", $line) // . . . . . . . . . . . . C ...but am reluctant to remove it at present, in case I've just forgotten them.
Blocks: 790889, 778688
Attached patch Part 1: Cleanup regex (obsolete) — Splinter Review
* Replaces \d\d? with \d+ * Removes unnecessary escaping before colons * Adds start of line anchors to: ** 'Automation Error:' ** 'buildbot.slave.commands.TimeoutError:' ** 'PROCESS-CRASH'
Attachment #663991 - Flags: review?(philringnalda)
Attached patch Part 2: Reorder (obsolete) — Splinter Review
* Puts the most common TEST-UNEXPECTED-(?:PASS|FAIL) case first. * Groups the rest a bit more logically.
Attachment #663994 - Flags: review?(philringnalda)
* Puts the more common TEST-INFO / TEST-UNEXPECTED-(?:PASS|FAIL) cases first. * Groups the rest a bit more logically.
Attachment #663994 - Attachment is obsolete: true
Attachment #663994 - Flags: review?(philringnalda)
Attachment #664005 - Flags: review?(philringnalda)
Same as v1 except doesn't add the start of line anchor to "Automation Error:", since otherwise we won't match the format that will soon be output thanks to bug 793641.
Attachment #663991 - Attachment is obsolete: true
Attachment #663991 - Flags: review?(philringnalda)
Attachment #664158 - Flags: review?(philringnalda)
Comment on attachment 664158 [details] [diff] [review] Part 1: Cleanup regex (v2) Switching review requests around to distribute the load a bit more evenly.
Attachment #664158 - Flags: review?(philringnalda) → review?(arpad.borsos)
Comment on attachment 664005 [details] [diff] [review] Part 2: Reorder (v2) Switching review requests around to distribute the load a bit more evenly.
Attachment #664005 - Flags: review?(philringnalda) → review?(arpad.borsos)
Attachment #664158 - Flags: review?(arpad.borsos) → review+
Attachment #664005 - Flags: review?(arpad.borsos) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Depends on: 794538
Product: Webtools → Tree Management
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: