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

Side by Side Diff: tools/perf/measurements/usecounter.py

Issue 2572003003: NOT FOR SUBMIT: use counters for jdm@
Patch Set: Merge branch 'jdm-usecounters' into jdm-merge Created 4 years 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/benchmarks/usecounter.py ('k') | tools/perf/metrics/usecounter.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 from telemetry.page import legacy_page_test
6
7 from metrics import usecounter
8
9 class UseCounter(legacy_page_test.LegacyPageTest):
10
11 def __init__(self, needs_browser_restart_after_each_page=False):
12 super(UseCounter, self).__init__(needs_browser_restart_after_each_page)
13 self._metric = usecounter.UseCounterMetric()
14
15 @classmethod
16 def CustomizeBrowserOptions(cls, options):
17 usecounter.UseCounterMetric.CustomizeBrowserOptions(options)
18
19 def WillNavigateToPage(self, page, tab):
20 self._metric.Start(page, tab)
21
22 def DidNavigateToPage(self, page, tab):
23 self._metric.Stop(page, tab)
24
25 def ValidateAndMeasurePage(self, page, tab, results):
26 self._metric.AddResults(tab, results)
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/usecounter.py ('k') | tools/perf/metrics/usecounter.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698