Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Issue 16373012: [telemetry] Simplify the way PageRunner is called. (Closed)

Created:
7 years, 6 months ago by dtu
Modified:
7 years, 6 months ago
Reviewers:
tonyg, nduca, marja
CC:
chromium-reviews, chrome-speed-team+watch_google.com, telemetry+watch_chromium.org, Randy Smith (Not in Mondays)
Visibility:
Public.

Description

[telemetry] Simplify the way PageRunner is called. Before: results = page_test_results.PageTestResults() with page_runner.PageRunner(ps): possible_browser = browser_finder.FindBrowser(options) runner.Run(options, possible_browser, test, results) After: results = page_runner.Run(test, ps, options) Turns out, PageRunner keeps very little state on its own, and stores most of its state in RunState. Using a with statement does nothing because PageRunner.Close() just passes. Therefore, we can get rid of the PageRunner object and just have page_runner.Run() directly. The only exception was has_called_will_run_page_set, which I solved by getting rid of WillRunPageSet() :( We can also move a lot of its setup methods to RunState, since those methods delve pretty deeply into RunState anyway. There's more work that could be done here in the future. Finally, move the results object and possible_browser creation from page_test_runner to page_runner/page_test. This will make it easier for the future test_runner to call page_runner directly. The separation of concerns is that test_runner/page_test_runner only deal with parsing the command line, and page_runner does everything else. In the future, page_test_runner can be obsoleted. BUG=237412 TEST=./run_tests, smoothness_measurement, and page_cycler with no failures. R=nduca@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=206529

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Merge. #

Patch Set 4 : Merge marja's #

Patch Set 5 : Add DidStartHTTPServer() and re-add WillRunPageSet() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+490 lines, -488 lines) Patch
M tools/perf/perf_tools/page_cycler.py View 1 2 3 4 4 chunks +22 lines, -18 lines 0 comments Download
M tools/telemetry/telemetry/core/browser.py View 1 2 3 4 1 chunk +5 lines, -2 lines 0 comments Download
M tools/telemetry/telemetry/page/csv_page_measurement_results.py View 1 1 chunk +4 lines, -2 lines 0 comments Download
M tools/telemetry/telemetry/page/csv_page_measurement_results_unittest.py View 1 4 chunks +4 lines, -8 lines 0 comments Download
M tools/telemetry/telemetry/page/page_measurement.py View 1 2 chunks +46 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/page/page_measurement_runner.py View 1 3 chunks +2 lines, -45 lines 0 comments Download
M tools/telemetry/telemetry/page/page_measurement_unittest_base.py View 1 2 chunks +4 lines, -8 lines 0 comments Download
M tools/telemetry/telemetry/page/page_runner.py View 1 2 3 4 4 chunks +352 lines, -334 lines 0 comments Download
M tools/telemetry/telemetry/page/page_runner_unittest.py View 1 7 chunks +18 lines, -32 lines 0 comments Download
M tools/telemetry/telemetry/page/page_test.py View 1 2 3 4 4 chunks +30 lines, -1 line 0 comments Download
M tools/telemetry/telemetry/page/page_test_runner.py View 1 5 chunks +3 lines, -38 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
dtu
WIP. tonyg, what do you think? I'm having trouble with the existence of has_called_will_run_page_set, since ...
7 years, 6 months ago (2013-06-11 01:16:08 UTC) #1
tonyg
On 2013/06/11 01:16:08, Dave Tu wrote: > WIP. tonyg, what do you think? I'm having ...
7 years, 6 months ago (2013-06-11 16:14:29 UTC) #2
dtu
PTAL
7 years, 6 months ago (2013-06-12 00:55:44 UTC) #3
nduca
Lets rename WillRunPageSet to be exactly what it does: DidReconfigureHTTPServer. Then LGTM.
7 years, 6 months ago (2013-06-14 23:03:57 UTC) #4
dtu
Hey marja, I merged one of your changes. Can you make sure it's right? :P
7 years, 6 months ago (2013-06-14 23:36:05 UTC) #5
dtu
Committed patchset #5 manually as r206529 (presubmit successful).
7 years, 6 months ago (2013-06-15 00:43:09 UTC) #6
marja
the wpr appending behavior lgtm (sadly, there's no test for it, it's kinda tricky to ...
7 years, 6 months ago (2013-06-18 07:49:59 UTC) #7
marja
Hmmh, this broke record_wpr. I'll revert this because fixing it is non-trivial (even with the ...
7 years, 6 months ago (2013-06-18 13:06:00 UTC) #8
marja
7 years, 6 months ago (2013-06-18 13:10:44 UTC) #9
Message was sent while issue was closed.
On 2013/06/18 13:06:00, marja wrote:
> Hmmh, this broke record_wpr. I'll revert this because fixing it is non-trivial
> (even with the API change, do I need to hack the options.output_format myself
or
> is there some getter funct that will create the right type of options for
me...)

I take this back. It doesn't revert cleanly. dtu@, what's the right fix for
record_wpr?

Powered by Google App Engine
This is Rietveld 408576698