RESOLVED FIXED 106172
Extract a class to represent a test result to simplify PerfTest.parse_output and PageLoadPerfTest._run_with_driver
https://bugs.webkit.org/show_bug.cgi?id=106172
Summary Extract a class to represent a test result to simplify PerfTest.parse_output ...
Ryosuke Niwa
Reported 2013-01-05 02:14:28 PST
Right now, PerfTest.parse_output is a God-function that parses text output of DriverOutput and creates the dictionary PerfTestRunner and the perf-o-matic expects. PageLoadPerfTest._run_with_driver has a similar problem. Extract a class that represents a test result in order to simplify these two functions.
Attachments
Patch (22.78 KB, patch)
2013-01-05 02:34 PST, Ryosuke Niwa
tony: review+
Ryosuke Niwa
Comment 1 2013-01-05 02:34:40 PST
Tony Chang
Comment 2 2013-01-07 09:57:17 PST
Comment on attachment 181432 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=181432&action=review > Tools/Scripts/webkitpy/performance_tests/perftest.py:56 > + allowed_metrics = ('Time', 'Malloc', 'JSHeap') Nit: I think we normally use ALL_CAPS for constants. Also, this looks like it is only used in the class so you could _ prefix it. > Tools/Scripts/webkitpy/performance_tests/perftest.py:59 > + def __init__(self, metric, unit=None, iterations=None): > + self._metric = metric Nit: Maybe assert here that metric is in allowed_metrics? > Tools/Scripts/webkitpy/performance_tests/perftest.py:245 > + current_metric = metric_match.group('metric').replace(' ', '') It's a bit unfortunate that we use "JS Heap" in one place and "JSHeap" in another. Maybe we can clean this up in a follow up.
Ryosuke Niwa
Comment 3 2013-01-07 10:29:17 PST
Note You need to log in before you can comment on or make changes to this bug.