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

Unified Diff: tools/telemetry/telemetry/page/record_wpr.py

Issue 465213002: [Telemetry] Remove arbitrary sleep in record_wpr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/record_wpr.py
diff --git a/tools/telemetry/telemetry/page/record_wpr.py b/tools/telemetry/telemetry/page/record_wpr.py
old mode 100755
new mode 100644
index a864cc67ce1fc9e782d3ac81251d4f7a2d52097e..114c7baad01d92f8d5d4b65962baac092f6f2eae
--- a/tools/telemetry/telemetry/page/record_wpr.py
+++ b/tools/telemetry/telemetry/page/record_wpr.py
@@ -1,10 +1,9 @@
-#!/usr/bin/env python
dtu 2014/08/13 05:47:07 Might have to disable executable bit?
tonyg 2014/08/13 05:51:34 I did. The unified diff shows the permissions chan
# Copyright 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+
import logging
import sys
-import time
from telemetry import benchmark
from telemetry.core import browser_options
@@ -15,6 +14,7 @@ from telemetry.page import page_set
from telemetry.page import page_test
from telemetry.page import profile_creator
from telemetry.page import test_expectations
+from telemetry.core import util
dtu 2014/08/13 05:47:07 out of order
tonyg 2014/08/13 05:51:34 Oops, fixed.
from telemetry.results import results_options
@@ -52,13 +52,7 @@ class RecorderPageTest(page_test.PageTest): # pylint: disable=W0223
def RunPage(self, page, tab, results):
tab.WaitForDocumentReadyStateToBeComplete()
-
- # When recording, sleep to catch any resources that load post-onload.
- # TODO(tonyg): This should probably monitor resource timing for activity
- # and sleep until 2s since the last network event with some timeout like
- # 20s. We could wrap this up as WaitForNetworkIdle() and share with the
- # speed index metric.
- time.sleep(3)
+ util.WaitFor(tab.HasReachedQuiescence, 30)
dtu 2014/08/13 05:47:07 30 is too long for the unit tests
tonyg 2014/08/13 05:51:34 They don't get anywhere near this because the simp
if self.page_test:
self._action_name_to_run = self.page_test.action_name_to_run
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698