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

Side by Side Diff: telemetry/telemetry/record_wpr.py

Issue 2941123002: [Telemetry] Move discover to common/py_utils (Closed)
Patch Set: fix imports Created 3 years, 6 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
OLDNEW
1 # Copyright 2012 The Chromium Authors. All rights reserved. 1 # Copyright 2012 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 import argparse 5 import argparse
6 import logging 6 import logging
7 import sys 7 import sys
8 8
9 from telemetry import benchmark 9 from telemetry import benchmark
10 from telemetry import story 10 from telemetry import story
11 from telemetry.core import discover
12 from telemetry.internal.browser import browser_options 11 from telemetry.internal.browser import browser_options
13 from telemetry.internal.results import results_options 12 from telemetry.internal.results import results_options
14 from telemetry.internal import story_runner 13 from telemetry.internal import story_runner
15 from telemetry.internal.util import binary_manager 14 from telemetry.internal.util import binary_manager
16 from telemetry.page import legacy_page_test 15 from telemetry.page import legacy_page_test
17 from telemetry.util import matching 16 from telemetry.util import matching
18 from telemetry.util import wpr_modes 17 from telemetry.util import wpr_modes
19 from telemetry.web_perf import timeline_based_measurement 18 from telemetry.web_perf import timeline_based_measurement
20 from telemetry.web_perf import timeline_based_page_test 19 from telemetry.web_perf import timeline_based_page_test
21 20
21 from py_utils import discover
22 import py_utils 22 import py_utils
23 23
24 DEFAULT_LOG_FORMAT = ( 24 DEFAULT_LOG_FORMAT = (
25 '(%(levelname)s) %(asctime)s %(module)s.%(funcName)s:%(lineno)d ' 25 '(%(levelname)s) %(asctime)s %(module)s.%(funcName)s:%(lineno)d '
26 '%(message)s') 26 '%(message)s')
27 27
28 28
29 class RecorderPageTest(legacy_page_test.LegacyPageTest): 29 class RecorderPageTest(legacy_page_test.LegacyPageTest):
30 def __init__(self): 30 def __init__(self):
31 super(RecorderPageTest, self).__init__() 31 super(RecorderPageTest, self).__init__()
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 binary_manager.InitDependencyManager(environment.client_configs) 290 binary_manager.InitDependencyManager(environment.client_configs)
291 291
292 # TODO(nednguyen): update WprRecorder so that it handles the difference 292 # TODO(nednguyen): update WprRecorder so that it handles the difference
293 # between recording a benchmark vs recording a story better based on 293 # between recording a benchmark vs recording a story better based on
294 # the distinction between args.benchmark & args.story 294 # the distinction between args.benchmark & args.story
295 wpr_recorder = WprRecorder(environment.top_level_dir, target, extra_args) 295 wpr_recorder = WprRecorder(environment.top_level_dir, target, extra_args)
296 results = wpr_recorder.CreateResults() 296 results = wpr_recorder.CreateResults()
297 wpr_recorder.Record(results) 297 wpr_recorder.Record(results)
298 wpr_recorder.HandleResults(results, args.upload) 298 wpr_recorder.HandleResults(results, args.upload)
299 return min(255, len(results.failures)) 299 return min(255, len(results.failures))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698