0

[telemetry] Sort imports in Telemetry and its dependents.

As part of the Telemetry public API refactor, I wrote a tool that sorts imports.
The tool will be checked in separately, but here's all the import changes in Telemetry and its dependencies.
It'll be easier to test the refactor tool if we do the import sorting in advance, so it doesn't clutter the diffs for the module moves.

Style guide rule: "Within each grouping, imports should be sorted lexicographically, ignoring case, according to each module's full package path."

BUG=449308
TEST=trybots (tools/telemetry/run_tests; tools/perf/run_tests)

Review URL: https://codereview.chromium.org/1029263003

Cr-Commit-Position: refs/heads/master@{#322211}
This commit is contained in:
dtu
2015-03-25 12:45:52 -07:00
committed by Commit bot
parent d428269ac3
commit fa7987281c
246 changed files with 469 additions and 381 deletions
chrome/test/telemetry/chromeos
content/test/gpu/gpu_tests
tools
chrome_proxy
perf
benchmarks
measurements
metrics
page_sets
profile_creators
telemetry
examples
telemetry
benchmark.pybenchmark_runner.pybenchmark_unittest.py
core
_bitmap.pyandroid_app_unittest.pyandroid_process.py
backends
browser.pybrowser_credentials.pybrowser_finder.pybrowser_options.pybrowser_unittest.pydiscover.py
forwarders
memory_cache_http_server.py
platform
tab_unittest.pyvideo_unittest.py
image_processing
page
results
timeline
unittest_util
user_story
util
value
web_components
web_perf

@ -6,11 +6,11 @@ import logging
import os
import unittest
from telemetry.core.backends.chrome import cros_interface
from telemetry.core import browser_finder
from telemetry.core import exceptions
from telemetry.core import extension_to_load
from telemetry.core import util
from telemetry.core.backends.chrome import cros_interface
from telemetry.unittest import options_for_unittests
class CrOSAutoTest(unittest.TestCase):

@ -5,9 +5,9 @@ import memory_test_expectations
import page_sets
from telemetry import benchmark
from telemetry.page import page_test
from telemetry.core.platform import tracing_category_filter
from telemetry.core.platform import tracing_options
from telemetry.page import page_test
from telemetry.timeline import counter
from telemetry.timeline import model

@ -1,13 +1,13 @@
# Copyright (c) 2015 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 trace_test_expectations
import page_sets
import trace_test_expectations
from telemetry import benchmark
from telemetry.page import page_test
from telemetry.core.platform import tracing_category_filter
from telemetry.core.platform import tracing_options
from telemetry.page import page_test
from telemetry.timeline import model as model_module
TOPLEVEL_GL_CATEGORY = 'gpu_toplevel'

@ -10,8 +10,8 @@ import webgl_conformance_expectations
from telemetry import benchmark as benchmark_module
from telemetry.core import util
from telemetry.page import page_set
from telemetry.page import page as page_module
from telemetry.page import page_set
from telemetry.page import page_test

@ -6,9 +6,9 @@ from telemetry.page import page
from telemetry.page import page_set
from telemetry.page import page_test
from webgl_conformance import WebglConformanceValidator
from webgl_conformance import conformance_harness_script
from webgl_conformance import conformance_path
from webgl_conformance import WebglConformanceValidator
robustness_harness_script = conformance_harness_script + r"""

@ -6,8 +6,8 @@ import base64
import unittest
from integration_tests import network_metrics
from telemetry.unittest_util import test_page_test_results
from telemetry.timeline import event
from telemetry.unittest_util import test_page_test_results
HTML_BODY = """<!DOCTYPE HTML>

@ -4,10 +4,10 @@
"""For all the benchmarks that set options, test that the options are valid."""
from collections import defaultdict
import logging
import os
import unittest
from collections import defaultdict
from telemetry import benchmark as benchmark_module
from telemetry.core import browser_options

@ -5,8 +5,8 @@
import os
from telemetry import benchmark
from telemetry import page as page_module
from telemetry.core import util
from telemetry import page as page_module
from telemetry.page import page_set
from telemetry.page import page_test
from telemetry.value import list_of_scalar_values

@ -7,8 +7,8 @@ import math
import os
from telemetry import benchmark
from telemetry import page as page_module
from telemetry.core import util
from telemetry import page as page_module
from telemetry.page import page_set
from telemetry.page import page_test
from telemetry.value import merge_values

@ -5,13 +5,14 @@
import math
import os
from metrics import power
from telemetry import benchmark
from telemetry import page as page_module
from telemetry.page import page_set
from telemetry.page import page_test
from telemetry.value import scalar
from metrics import power
class _DromaeoMeasurement(page_test.PageTest):
def __init__(self):

@ -1,12 +1,13 @@
# Copyright 2015 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.
from benchmarks import silk_flags
import page_sets
from telemetry import benchmark
from telemetry.core.platform import tracing_category_filter
from telemetry.web_perf import timeline_based_measurement
from telemetry.web_perf.metrics import gpu_timeline
from telemetry.web_perf import timeline_based_measurement
from benchmarks import silk_flags
import page_sets
TOPLEVEL_GL_CATEGORY = 'gpu_toplevel'
TOPLEVEL_CATEGORIES = ['disabled-by-default-gpu.device',

@ -2,10 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from page_sets import inbox
from telemetry import benchmark
from telemetry.web_perf import timeline_based_measurement
from page_sets import inbox
@benchmark.Disabled # http://crbug.com/452257
class Inbox(benchmark.Benchmark):
"""Runs the timeline based measurement against inbox pageset."""

@ -22,15 +22,17 @@ Cursors:
import json
import os
from metrics import memory
from metrics import power
from telemetry import benchmark
from telemetry import page as page_module
from telemetry.core import util
from telemetry import page as page_module
from telemetry.page import page_set
from telemetry.page import page_test
from telemetry.value import scalar
from metrics import memory
from metrics import power
class _IndexedDbMeasurement(page_test.PageTest):
def __init__(self):
super(_IndexedDbMeasurement, self).__init__()

@ -6,7 +6,6 @@
import os
from metrics import power
from telemetry import benchmark
from telemetry import page as page_module
from telemetry.page import page_set
@ -14,6 +13,9 @@ from telemetry.page import page_test
from telemetry.value import list_of_scalar_values
from telemetry.value import scalar
from metrics import power
DESCRIPTIONS = {
'ai-astar':
'This benchmark uses the [A* search algorithm]'

@ -2,13 +2,14 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import media
import page_sets
from telemetry import benchmark
from telemetry.page import page_test
from telemetry.value import list_of_scalar_values
from telemetry.value import scalar
from measurements import media
import page_sets
class _MSEMeasurement(page_test.PageTest):
def __init__(self):

@ -2,9 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from measurements import memory
import page_sets
from telemetry import benchmark
@benchmark.Enabled('android')

@ -13,7 +13,6 @@ Octane 2.0 consists of 17 tests, four more than Octane v1.
import os
from metrics import power
from telemetry import benchmark
from telemetry import page as page_module
from telemetry.page import page_set
@ -21,6 +20,8 @@ from telemetry.page import page_test
from telemetry.util import statistics
from telemetry.value import scalar
from metrics import power
_GB = 1024 * 1024 * 1024
DESCRIPTIONS = {

@ -4,14 +4,15 @@
import os
import page_sets
from benchmarks import blink_perf
from benchmarks import silk_flags
from measurements import oilpan_gc_times
from telemetry import benchmark
from telemetry.core import util
from telemetry import page
from benchmarks import blink_perf
from benchmarks import silk_flags
from measurements import oilpan_gc_times
import page_sets
class OilpanGCTimesBlinkPerfAnimation(benchmark.Benchmark):
tag = 'blink_perf_animation'

@ -2,9 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from measurements import page_cycler
import page_sets
from telemetry import benchmark
class _PageCycler(benchmark.Benchmark):

@ -2,9 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from measurements import polymer_load
import page_sets
from telemetry import benchmark
@benchmark.Enabled('android')

@ -2,9 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from measurements import power
import page_sets
from telemetry import benchmark
@benchmark.Enabled('android')

@ -2,9 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from measurements import rasterize_and_record_micro
import page_sets
from telemetry import benchmark
class _RasterizeAndRecordMicro(benchmark.Benchmark):

@ -2,10 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from benchmarks import silk_flags
from measurements import repaint as repaint_measurement
import page_sets
from telemetry import benchmark
class _Repaint(benchmark.Benchmark):

@ -6,13 +6,14 @@
import os
from metrics import power
from telemetry import benchmark
from telemetry import page as page_module
from telemetry.page import page_set
from telemetry.page import page_test
from telemetry.value import scalar
from metrics import power
class _RobohornetProMeasurement(page_test.PageTest):
def __init__(self):

@ -3,6 +3,7 @@
# found in the LICENSE file.
from telemetry import benchmark
from measurements import smoothness
import page_sets

@ -6,8 +6,6 @@ import collections
import page_sets
import re
from measurements import timeline_controller
from metrics import speedindex
from telemetry import benchmark
from telemetry.core import util
from telemetry.page import page_test
@ -15,6 +13,9 @@ from telemetry.timeline import async_slice as async_slice_module
from telemetry.timeline import slice as slice_module
from telemetry.value import scalar
from measurements import timeline_controller
from metrics import speedindex
class _ServiceWorkerTimelineMetric(object):
def AddResultsOfCounters(self, process, counter_regex_string, results):

@ -5,11 +5,12 @@
import os
import tempfile
from telemetry import benchmark
from measurements import session_restore
import page_sets
from profile_creators import profile_generator
from profile_creators import small_profile_creator
from telemetry import benchmark
class _SessionRestoreTypical25(benchmark.Benchmark):

@ -2,11 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import skpicture_printer
from telemetry import benchmark
from telemetry.core import discover
from telemetry.page import page_set
from measurements import skpicture_printer
def _MatchPageSetName(page_set_name, page_set_base_dir):
page_sets = []

@ -2,11 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from benchmarks import silk_flags
from benchmarks import webgl_expectations
from measurements import smoothness
import page_sets
from telemetry import benchmark
class SmoothnessTop25(benchmark.Benchmark):

@ -8,8 +8,8 @@ import logging
import os
from telemetry import benchmark
from telemetry import page as page_module
from telemetry.core import util
from telemetry import page as page_module
from telemetry.page import page_set
from telemetry.page import page_test
from telemetry.value import list_of_scalar_values

@ -18,13 +18,14 @@ engine, CSS style resolution, layout, and other technologies.
import os
from metrics import keychain_metric
from telemetry import benchmark
from telemetry import page as page_module
from telemetry.page import page_set
from telemetry.page import page_test
from telemetry.value import list_of_scalar_values
from metrics import keychain_metric
class SpeedometerMeasurement(page_test.PageTest):
enabled_suites = [

@ -2,9 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from measurements import startup
import page_sets
from telemetry import benchmark
class _StartWithUrl(benchmark.Benchmark):

@ -2,9 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from measurements import startup
import page_sets
from telemetry import benchmark
class _StartupCold(benchmark.Benchmark):

@ -5,13 +5,14 @@ import collections
import json
import os
from metrics import power
from telemetry import benchmark
from telemetry import page as page_module
from telemetry.page import page_set
from telemetry.page import page_test
from telemetry.value import list_of_scalar_values
from metrics import power
_URL = 'http://www.webkit.org/perf/sunspider-1.0.2/sunspider-1.0.2/driver.html'

@ -2,9 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from measurements import task_execution_time
import page_sets
from telemetry import benchmark
@benchmark.Enabled('android')

@ -2,10 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from benchmarks import silk_flags
from measurements import thread_times
import page_sets
from telemetry import benchmark
class _ThreadTimes(benchmark.Benchmark):
@classmethod

@ -2,10 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import page_sets
from telemetry import benchmark
from measurements import v8_detached_context_age_in_gc
from measurements import v8_gc_times
from telemetry import benchmark
import page_sets
@benchmark.Disabled('win') # crbug.com/416502

@ -2,9 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from measurements import webrtc
import page_sets
from telemetry import benchmark
class WebRTC(benchmark.Benchmark):

@ -2,14 +2,14 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from metrics import power
from telemetry.core.platform import tracing_category_filter
from telemetry.core.platform import tracing_options
from telemetry.page import page_test
from telemetry.timeline import model
from telemetry.value import scalar
from metrics import power
class ImageDecoding(page_test.PageTest):
def __init__(self):

@ -4,9 +4,9 @@
"""Measurement smoke test to make sure that no new action_name_to_run is
defined."""
import os
import optparse
import logging
import optparse
import os
import unittest
from telemetry import benchmark as benchmark_module

@ -2,11 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page_test
from metrics import cpu
from metrics import media
from metrics import system_memory
from metrics import power
from telemetry.page import page_test
from metrics import system_memory
class Media(page_test.PageTest):

@ -2,9 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page_test
from metrics import memory
from metrics import power
from telemetry.page import page_test
class Memory(page_test.PageTest):
def __init__(self):

@ -8,9 +8,10 @@ This test is a multi tab test, but we're interested in measurements for
the entire test rather than each single page.
"""
from telemetry.page import page_test
from metrics import memory
from telemetry.page import page_test
class MemoryMultiTab(page_test.PageTest):
def __init__(self):

@ -4,18 +4,19 @@
import os
from measurements import smoothness_controller
from measurements import timeline_controller
from telemetry.core.platform import tracing_category_filter
from telemetry.core.platform import tracing_options
from telemetry.page import page_test
from telemetry.page.actions import action_runner
from telemetry.page import page_test
from telemetry.timeline.model import TimelineModel
from telemetry.util import statistics
from telemetry.value import list_of_scalar_values
from telemetry.value import scalar
from telemetry.value import trace
from measurements import smoothness_controller
from measurements import timeline_controller
_CR_RENDERER_MAIN = 'CrRendererMain'
_RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions'

@ -2,10 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import oilpan_gc_times
from telemetry.unittest_util import options_for_unittests
from telemetry.unittest_util import page_test_test_case
from measurements import oilpan_gc_times
class OilpanGCTimesTest(page_test_test_case.PageTestTestCase):
"""Smoke test for Oilpan GC pause time measurements.

@ -18,14 +18,15 @@ cycling all pages.
import collections
import os
from telemetry.core import util
from telemetry.page import page_test
from telemetry.value import scalar
from metrics import cpu
from metrics import keychain_metric
from metrics import memory
from metrics import power
from metrics import speedindex
from telemetry.core import util
from telemetry.page import page_test
from telemetry.value import scalar
class PageCycler(page_test.PageTest):

@ -5,13 +5,13 @@
import sys
import unittest
from metrics import keychain_metric
from telemetry.core import browser_options
from telemetry.results import page_test_results
from telemetry.unittest_util import simple_mock
from telemetry.user_story import user_story_runner
from measurements import page_cycler
from metrics import keychain_metric
# Allow testing protected members in the unit test.

@ -2,9 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from metrics import power
from telemetry.page import page_test
from metrics import power
class Power(page_test.PageTest):
def __init__(self):
super(Power, self).__init__()

@ -4,13 +4,14 @@
import logging
from measurements import rasterize_and_record_micro
from telemetry import decorators
from telemetry.core import wpr_modes
from telemetry import decorators
from telemetry.page import page_test
from telemetry.unittest_util import options_for_unittests
from telemetry.unittest_util import page_test_test_case
from measurements import rasterize_and_record_micro
class RasterizeAndRecordMicroUnitTest(page_test_test_case.PageTestTestCase):
"""Smoke test for rasterize_and_record_micro measurement

@ -4,10 +4,11 @@
import time
from measurements import smoothness
from telemetry.page import page_test
from telemetry.value import scalar
from measurements import smoothness
class RecordPerArea(page_test.PageTest):
def __init__(self, start_wait_time=2):

@ -2,12 +2,13 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import record_per_area
from telemetry.core import wpr_modes
from telemetry import decorators
from telemetry.unittest_util import options_for_unittests
from telemetry.unittest_util import page_test_test_case
from measurements import record_per_area
class RecordPerAreaUnitTest(page_test_test_case.PageTestTestCase):
"""Smoke test for record_per_area measurement

@ -2,9 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import smoothness_controller
from telemetry.page import page_test
from measurements import smoothness_controller
class Repaint(page_test.PageTest):
def __init__(self, mode='viewport', width=None, height=None):

@ -2,13 +2,14 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import repaint
from telemetry import decorators
from telemetry.core import wpr_modes
from telemetry import decorators
from telemetry.page import page as page_module
from telemetry.unittest_util import options_for_unittests
from telemetry.unittest_util import page_test_test_case
from measurements import repaint
class TestRepaintPage(page_module.Page):
def __init__(self, page_set, base_dir):

@ -4,13 +4,15 @@
import collections
from measurements import startup
from metrics import cpu
from metrics import startup_metric
from telemetry.core import util
from telemetry.value import histogram
from telemetry.value import histogram_util
from measurements import startup
from metrics import cpu
from metrics import startup_metric
_HISTOGRAMS = [
{
'name': 'SessionRestore.ForegroundTabFirstLoaded',

@ -5,11 +5,12 @@
import shutil
import tempfile
from measurements import skpicture_printer
from telemetry import decorators
from telemetry.unittest_util import options_for_unittests
from telemetry.unittest_util import page_test_test_case
from measurements import skpicture_printer
class SkpicturePrinterUnitTest(page_test_test_case.PageTestTestCase):
def setUp(self):

@ -4,10 +4,9 @@
import time
import unittest
from measurements import smooth_gesture_util as sg_util
from telemetry import decorators
from telemetry.core.platform import tracing_category_filter
from telemetry.core.platform import tracing_options
from telemetry import decorators
from telemetry.page import page as page_module
from telemetry.page import page_test
from telemetry.timeline import async_slice
@ -15,6 +14,8 @@ from telemetry.timeline import model as model_module
from telemetry.unittest_util import page_test_test_case
from telemetry.web_perf import timeline_interaction_record as tir_module
from measurements import smooth_gesture_util as sg_util
class SmoothGestureUtilTest(unittest.TestCase):
def testGetAdjustedInteractionIfContainGesture(self):

@ -2,10 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from metrics import power
from measurements import smoothness_controller
from telemetry.page import page_test
from measurements import smoothness_controller
from metrics import power
class Smoothness(page_test.PageTest):
def __init__(self):

@ -3,18 +3,19 @@
# found in the LICENSE file.
import sys
from measurements import smooth_gesture_util
from telemetry.core.platform import tracing_category_filter
from telemetry.core.platform import tracing_options
from telemetry.timeline import trace_data as trace_data_module
from telemetry.timeline.model import TimelineModel
from telemetry.page import page_test
from telemetry.page.actions import action_runner
from telemetry.page import page_test
from telemetry.timeline.model import TimelineModel
from telemetry.timeline import trace_data as trace_data_module
from telemetry.value import list_of_scalar_values
from telemetry.value import scalar
from telemetry.value import trace
from telemetry.web_perf import timeline_interaction_record as tir_module
from telemetry.web_perf.metrics import smoothness
from telemetry.web_perf import timeline_interaction_record as tir_module
from measurements import smooth_gesture_util
RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions'

@ -3,15 +3,17 @@
# found in the LICENSE file.
import sys
from measurements import smoothness
from metrics import power
from telemetry import decorators
from telemetry.core import exceptions
from telemetry.core import wpr_modes
from telemetry import decorators
from telemetry.page import page
from telemetry.unittest_util import options_for_unittests
from telemetry.unittest_util import page_test_test_case
from measurements import smoothness
from metrics import power
class FakeTracingController(object):
def __init__(self):
self.category_filter = None

@ -2,9 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page_test
from metrics import keychain_metric
from metrics import startup_metric
from telemetry.page import page_test
class Startup(page_test.PageTest):

@ -12,13 +12,14 @@ Power usage is also measured.
import time
from metrics import keychain_metric
from metrics import power
from telemetry.core import util
from telemetry.page import page_test
from telemetry.value import histogram
from telemetry.value import histogram_util
from metrics import keychain_metric
from metrics import power
# TODO: Revisit this test once multitab support is finalized.
class TabSwitching(page_test.PageTest):

@ -2,9 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import task_execution_time
from telemetry import decorators
from telemetry.core import wpr_modes
from telemetry import decorators
from telemetry.page import page as page_module
from telemetry.results import page_test_results
from telemetry.timeline import model as model_module
@ -12,6 +11,8 @@ from telemetry.timeline import slice as slice_data
from telemetry.unittest_util import options_for_unittests
from telemetry.unittest_util import page_test_test_case
from measurements import task_execution_time
class TestTaskExecutionTimePage(page_module.Page):

@ -1,12 +1,15 @@
# Copyright 2014 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.
from measurements import timeline_controller
from metrics import timeline
from telemetry.core.platform import tracing_category_filter
from telemetry.page import page_test
from telemetry.web_perf.metrics import layout
from measurements import timeline_controller
from metrics import timeline
class ThreadTimes(page_test.PageTest):
def __init__(self, report_silk_details=False):
super(ThreadTimes, self).__init__()

@ -2,14 +2,15 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import thread_times
from measurements import smoothness_unittest
from metrics import timeline
from telemetry import decorators
from telemetry.core import wpr_modes
from telemetry.web_perf.metrics.layout import LayoutMetric
from telemetry import decorators
from telemetry.unittest_util import options_for_unittests
from telemetry.unittest_util import page_test_test_case
from telemetry.web_perf.metrics.layout import LayoutMetric
from measurements import smoothness_unittest
from measurements import thread_times
from metrics import timeline
class ThreadTimesUnitTest(page_test_test_case.PageTestTestCase):

@ -1,15 +1,16 @@
# Copyright 2014 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.
from measurements import smooth_gesture_util
from telemetry.core.platform import tracing_category_filter
from telemetry.core.platform import tracing_options
from telemetry.timeline.model import TimelineModel
from telemetry.page.actions import action_runner
from telemetry.timeline.model import TimelineModel
from telemetry.value import trace
from telemetry.web_perf import timeline_interaction_record as tir_module
from measurements import smooth_gesture_util
RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions'

@ -3,6 +3,7 @@
# found in the LICENSE file.
import json
from telemetry.page import page_test
from telemetry.value import histogram
from telemetry.value import histogram_util

@ -2,15 +2,16 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import v8_detached_context_age_in_gc
from telemetry.core import wpr_modes
from telemetry.page import page_test
from telemetry.page import page as page_module
from telemetry.page import page_test
from telemetry.results import page_test_results
from telemetry.unittest_util import options_for_unittests
from telemetry.unittest_util import page_test_test_case
from telemetry.value import skip
from measurements import v8_detached_context_age_in_gc
class FakePage(object):
def __init__(self, url):

@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import v8_gc_times
from telemetry.core import wpr_modes
from telemetry.page import page as page_module
from telemetry.results import page_test_results
@ -10,6 +9,8 @@ from telemetry.timeline import model as model_module
from telemetry.unittest_util import options_for_unittests
from telemetry.unittest_util import page_test_test_case
from measurements import v8_gc_times
class V8GCTimesTestPageHelper(object):

@ -2,12 +2,13 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page_test
from metrics import cpu
from metrics import media
from metrics import memory
from metrics import power
from metrics import webrtc_stats
from telemetry.page import page_test
class WebRTC(page_test.PageTest):

@ -2,9 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from metrics import Metric
from telemetry.value import scalar
from metrics import Metric
class CpuMetric(Metric):
"""Calulates CPU load over a span of time."""

@ -5,11 +5,12 @@
import logging
import sys
from metrics import Metric
from telemetry.util.mac import keychain_helper
from telemetry.value import histogram_util
from telemetry.value import scalar
from metrics import Metric
class KeychainMetric(Metric):
"""KeychainMetric gathers keychain statistics from the browser object.

@ -2,9 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from metrics import Metric
from telemetry.value import scalar
from metrics import Metric
class LoadingMetric(Metric):
"""A metric for page loading time based entirely on window.performance"""

@ -4,10 +4,11 @@
import logging
import os
from metrics import Metric
from telemetry.value import list_of_scalar_values
from telemetry.value import scalar
from metrics import Metric
class MediaMetric(Metric):
"""MediaMetric class injects and calls JS responsible for recording metrics.

@ -4,11 +4,12 @@
import sys
from metrics import Metric
from telemetry.value import histogram
from telemetry.value import histogram_util
from telemetry.value import scalar
from metrics import Metric
_HISTOGRAMS = [
{

@ -4,10 +4,11 @@
import time
from metrics import Metric
from telemetry.core.platform import process_statistic_timeline_data
from telemetry.value import scalar
from metrics import Metric
class PowerMetric(Metric):
"""A metric for measuring power usage."""

@ -5,11 +5,12 @@
import collections
import logging
from metrics import Metric
from telemetry.image_processing import image_util
from telemetry.image_processing import rgba_color
from telemetry.value import scalar
from metrics import Metric
class SpeedIndexMetric(Metric):
"""The speed index metric is one way of measuring page load speed.

@ -9,10 +9,11 @@ import json
import os
import unittest
from metrics import speedindex
from telemetry.image_processing import histogram
from telemetry.image_processing import rgba_color
from metrics import speedindex
class FakeImageUtil(object):
# pylint: disable=W0613

@ -5,12 +5,12 @@ import collections
import json
import logging
from metrics import Metric
from telemetry.core import exceptions
from telemetry.value import histogram_util
from telemetry.value import scalar
from metrics import Metric
class StartupMetric(Metric):
"A metric for browser startup time."

@ -2,9 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.value import scalar
from metrics import memory
from metrics import Metric
from telemetry.value import scalar
class SystemMemoryMetric(Metric):

@ -2,10 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
from telemetry.util.statistics import DivideIfPossibleOrZero
from telemetry.web_perf.metrics import timeline_based_metric
from telemetry.util.statistics import DivideIfPossibleOrZero
from telemetry.value import scalar
from telemetry.web_perf.metrics import timeline_based_metric
class LoadTimesTimelineMetric(timeline_based_metric.TimelineBasedMetric):

@ -4,11 +4,13 @@
import unittest
from metrics import timeline
from telemetry.unittest_util import test_page_test_results
from telemetry.timeline import model as model_module
from telemetry.unittest_util import test_page_test_results
from telemetry.web_perf import timeline_interaction_record as tir_module
from metrics import timeline
def _GetInteractionRecord(start, end):
return tir_module.TimelineInteractionRecord("test-record", start, end)

@ -6,10 +6,12 @@ import json
import logging
import re
from metrics import Metric
from telemetry.core import camel_case
from telemetry.value import list_of_scalar_values
from metrics import Metric
INTERESTING_METRICS = {
'packetsReceived': {
'units': 'packets',

@ -4,9 +4,10 @@
import unittest
from metrics import webrtc_stats
from telemetry.unittest_util import simple_mock
from metrics import webrtc_stats
SAMPLE_JSON = '''
[[

@ -4,8 +4,8 @@
import json
import os
from telemetry.page.page_set import PageSet
from telemetry.page.page import Page
from telemetry.page.page_set import PageSet
__location__ = os.path.realpath(

@ -1,11 +1,12 @@
# Copyright 2014 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.
from page_sets import webgl_supported_shared_state
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
from page_sets import webgl_supported_shared_state
class MapsPage(page_module.Page):

@ -1,7 +1,9 @@
# Copyright 2014 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.
from telemetry.page import page_set as page_set_module
from measurements import polymer_load

@ -2,8 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page_set
from telemetry.page import page
from telemetry.page import page_set
TOP_2013_URLS = [

@ -1,7 +1,9 @@
# Copyright 2014 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.
from telemetry.page import page_set as page_set_module
from measurements import polymer_load

@ -6,8 +6,8 @@
from __future__ import print_function
import argparse
import StringIO
import random
import StringIO
import sys
import zlib

@ -1,11 +1,12 @@
# Copyright 2014 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.
from page_sets import webgl_supported_shared_state
from telemetry.page import shared_page_state
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
from telemetry.page import shared_page_state
from page_sets import webgl_supported_shared_state
class ToughWebglCasesPage(page_module.Page):

@ -2,8 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import multiprocessing
import tempfile
import os
import tempfile
from profile_creators import fast_navigation_profile_extender

@ -7,8 +7,8 @@ import tempfile
import unittest
from profile_creators.history_profile_extender import HistoryProfileExtender
from telemetry import decorators
from telemetry.core import util
from telemetry import decorators
from telemetry.unittest_util import options_for_unittests
util.AddDirToPythonPath(util.GetTelemetryDir(), 'third_party', 'mock')

@ -9,19 +9,19 @@ import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir))
sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
'perf'))
from telemetry.page import page as page_module
from telemetry.results import buildbot_output_formatter
from telemetry.results import page_test_results
from telemetry.timeline import model
from telemetry.timeline import tracing_timeline_data
from telemetry.results import page_test_results
from telemetry.results import buildbot_output_formatter
from telemetry.web_perf import timeline_interaction_record as tir_module
from telemetry.web_perf.metrics import smoothness
from telemetry.web_perf import timeline_interaction_record as tir_module
sys.path.append(os.path.join(
os.path.dirname(__file__), os.pardir, os.pardir, 'perf'))
# pylint: disable=F0401
from measurements import smoothness_controller
from measurements import smooth_gesture_util
from measurements import smoothness_controller
def _ExtractInteractionsRecordFromThread(thread, timeline_model):

@ -9,16 +9,16 @@ import shutil
import sys
import zipfile
from telemetry import decorators
from telemetry import page
from telemetry.core import browser_finder
from telemetry.core import command_line
from telemetry.core import util
from telemetry.user_story import user_story_runner
from telemetry import decorators
from telemetry import page
from telemetry.page import page_set
from telemetry.page import page_test
from telemetry.page import test_expectations
from telemetry.results import results_options
from telemetry.user_story import user_story_runner
from telemetry.util import cloud_storage
from telemetry.util import exception_formatter
from telemetry.web_perf import timeline_based_measurement

@ -14,12 +14,12 @@ import os
import sys
from telemetry import benchmark
from telemetry import decorators
from telemetry.core import browser_finder
from telemetry.core import browser_options
from telemetry.core import command_line
from telemetry.core import discover
from telemetry.core import util
from telemetry import decorators
from telemetry.util import find_dependencies

@ -6,11 +6,11 @@ import optparse
import unittest
from telemetry import benchmark
from telemetry import page
from telemetry import user_story
from telemetry.core import browser_options
from telemetry import page
from telemetry.page import page_test
from telemetry.page import shared_page_state
from telemetry import user_story
from telemetry.user_story import android
from telemetry.user_story import shared_user_story_state
from telemetry.user_story import user_story_runner

@ -13,8 +13,8 @@ import cStringIO
import struct
import subprocess
from telemetry.core import util
from telemetry.core import platform
from telemetry.core import util
from telemetry.image_processing import histogram
from telemetry.image_processing import rgba_color
from telemetry.util import support_binaries

@ -8,8 +8,8 @@ import unittest
from pylib.device import intent
from telemetry.core import android_app
from telemetry.core import platform as platform_module
from telemetry.core.backends import android_app_backend
from telemetry.core import platform as platform_module
from telemetry.core.platform import android_device
from telemetry.unittest_util import options_for_unittests

@ -2,9 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.core import web_contents
from telemetry.core.backends import adb_commands
from telemetry.core.backends.chrome_inspector import devtools_client_backend
from telemetry.core import web_contents
class WebViewNotFoundException(Exception):
pass

@ -6,12 +6,12 @@ import re
import time
from telemetry.core import android_process
from telemetry.core import util
from telemetry.core import web_contents
from telemetry.core.backends import adb_commands
from telemetry.core.backends import app_backend
from telemetry.core.backends import android_browser_backend_settings
from telemetry.core.backends import android_command_line_backend
from telemetry.core.backends import app_backend
from telemetry.core import util
from telemetry.core import web_contents
class AndroidAppBackend(app_backend.AppBackend):

Some files were not shown because too many files have changed in this diff Show More