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

Unified Diff: tools/perf/measurements/loading_profile.py

Issue 540483004: Remove loading_profile measurement since it's not used and uses profiler wrongly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/perf/measurements/loading_profile.py
diff --git a/tools/perf/measurements/loading_profile.py b/tools/perf/measurements/loading_profile.py
deleted file mode 100644
index 34425ea1eb76f2b921eab1e3542302ddbf91f8c7..0000000000000000000000000000000000000000
--- a/tools/perf/measurements/loading_profile.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 2013 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 os
-import tempfile
-
-from metrics import loading
-from telemetry.core.platform.profiler import perf_profiler
-from telemetry.page import page_test
-from telemetry.value import scalar
-
-
-class LoadingProfile(page_test.PageTest):
- options = {'page_repeat': 2}
-
- def __init__(self):
- super(LoadingProfile, self).__init__(discard_first_result=True)
-
- def CustomizeBrowserOptions(self, options):
- if not perf_profiler.PerfProfiler.is_supported(browser_type='any'):
- raise Exception('This measurement is not supported on this platform')
-
- perf_profiler.PerfProfiler.CustomizeBrowserOptions(
- browser_type='any', options=options)
-
- def WillNavigateToPage(self, page, tab):
- tab.browser.StartProfiling(perf_profiler.PerfProfiler.name(),
- os.path.join(tempfile.mkdtemp(),
- page.file_safe_name))
-
- def ValidateAndMeasurePage(self, page, tab, results):
- # In current telemetry tests, all tests wait for DocumentComplete state,
- # but we need to wait for the load event.
- tab.WaitForJavaScriptExpression('performance.timing.loadEventStart', 300)
-
- profile_files = tab.browser.StopProfiling()
-
- loading.LoadingMetric().AddResults(tab, results)
-
- profile_file = None
- for profile_file in profile_files:
- if 'renderer' in profile_file:
- break
-
- for function, period in perf_profiler.PerfProfiler.GetTopSamples(
- profile_file, 10).iteritems():
- results.AddValue(scalar.ScalarValue(
- results.current_page, function.replace('.', '_'), 'period', period))
« 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