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

Side by Side Diff: tools/perf/metrics/loading.py

Issue 1029263003: [telemetry] Sort imports in Telemetry and its dependents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure we're up to date. Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « tools/perf/metrics/keychain_metric.py ('k') | tools/perf/metrics/media.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from telemetry.value import scalar
6
5 from metrics import Metric 7 from metrics import Metric
6 from telemetry.value import scalar 8
7 9
8 class LoadingMetric(Metric): 10 class LoadingMetric(Metric):
9 """A metric for page loading time based entirely on window.performance""" 11 """A metric for page loading time based entirely on window.performance"""
10 12
11 def Start(self, page, tab): 13 def Start(self, page, tab):
12 raise NotImplementedError() 14 raise NotImplementedError()
13 15
14 def Stop(self, page, tab): 16 def Stop(self, page, tab):
15 raise NotImplementedError() 17 raise NotImplementedError()
16 18
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 float(load_timings['responseStart']) - load_timings['requestStart']) 62 float(load_timings['responseStart']) - load_timings['requestStart'])
61 results.AddValue(scalar.ScalarValue( 63 results.AddValue(scalar.ScalarValue(
62 results.current_page, 'request_duration', 'ms', request_duration, 64 results.current_page, 'request_duration', 'ms', request_duration,
63 important=False)) 65 important=False))
64 66
65 response_duration = ( 67 response_duration = (
66 float(load_timings['responseEnd']) - load_timings['responseStart']) 68 float(load_timings['responseEnd']) - load_timings['responseStart'])
67 results.AddValue(scalar.ScalarValue( 69 results.AddValue(scalar.ScalarValue(
68 results.current_page, 'response_duration', 'ms', response_duration, 70 results.current_page, 'response_duration', 'ms', response_duration,
69 important=False)) 71 important=False))
OLDNEW
« no previous file with comments | « tools/perf/metrics/keychain_metric.py ('k') | tools/perf/metrics/media.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698