summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornednguyen@google.com <nednguyen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-27 15:01:34 +0000
committernednguyen@google.com <nednguyen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-27 15:01:34 +0000
commitddbe1fa2ce867f29d30296a061d145f433d2c8ab (patch)
tree315202f4d86972be6706c6dc01bcf6a60c3faae1
parentaa94a07844ecf1fd335fc6b8184b130be020e660 (diff)
downloadchromium_src-ddbe1fa2ce867f29d30296a061d145f433d2c8ab.zip
chromium_src-ddbe1fa2ce867f29d30296a061d145f433d2c8ab.tar.gz
chromium_src-ddbe1fa2ce867f29d30296a061d145f433d2c8ab.tar.bz2
Rename telemetry.test.Test to telemetry.benchmark.Benchmark.
BUG=383629 Review URL: https://codereview.chromium.org/337603005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280332 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/test/gpu/gpu_tests/cloud_storage_test_base.py4
-rw-r--r--content/test/gpu/gpu_tests/context_lost.py4
-rw-r--r--content/test/gpu/gpu_tests/gpu_process.py4
-rw-r--r--content/test/gpu/gpu_tests/hardware_accelerated_feature.py4
-rw-r--r--content/test/gpu/gpu_tests/maps.py2
-rw-r--r--content/test/gpu/gpu_tests/memory.py4
-rw-r--r--content/test/gpu/gpu_tests/pixel.py2
-rw-r--r--content/test/gpu/gpu_tests/screenshot_sync.py10
-rw-r--r--content/test/gpu/gpu_tests/webgl_conformance.py4
-rw-r--r--content/test/gpu/gpu_tests/webgl_robustness.py4
-rw-r--r--tools/perf/benchmarks/benchmark_unittest.py16
-rw-r--r--tools/perf/benchmarks/blink_perf.py6
-rw-r--r--tools/perf/benchmarks/browsermark.py4
-rw-r--r--tools/perf/benchmarks/canvasmark.py4
-rw-r--r--tools/perf/benchmarks/chrome_proxy.py22
-rw-r--r--tools/perf/benchmarks/dom_perf.py6
-rw-r--r--tools/perf/benchmarks/dromaeo.py6
-rw-r--r--tools/perf/benchmarks/endure.py4
-rw-r--r--tools/perf/benchmarks/html5gaming.py4
-rw-r--r--tools/perf/benchmarks/image_decoding.py4
-rw-r--r--tools/perf/benchmarks/indexeddb_perf.py4
-rw-r--r--tools/perf/benchmarks/jetstream.py6
-rw-r--r--tools/perf/benchmarks/jsgamebench.py6
-rw-r--r--tools/perf/benchmarks/kraken.py4
-rw-r--r--tools/perf/benchmarks/maps.py6
-rw-r--r--tools/perf/benchmarks/media.py14
-rw-r--r--tools/perf/benchmarks/memory.py14
-rw-r--r--tools/perf/benchmarks/memory_pressure.py6
-rw-r--r--tools/perf/benchmarks/octane.py4
-rw-r--r--tools/perf/benchmarks/page_cycler.py40
-rw-r--r--tools/perf/benchmarks/peacekeeper.py4
-rw-r--r--tools/perf/benchmarks/pica.py4
-rw-r--r--tools/perf/benchmarks/polymer_load.py4
-rw-r--r--tools/perf/benchmarks/rasterize_and_record_micro.py23
-rw-r--r--tools/perf/benchmarks/repaint.py6
-rw-r--r--tools/perf/benchmarks/robohornet_pro.py4
-rw-r--r--tools/perf/benchmarks/scheduler.py8
-rw-r--r--tools/perf/benchmarks/scirra.py4
-rw-r--r--tools/perf/benchmarks/service_worker.py4
-rw-r--r--tools/perf/benchmarks/session_restore.py12
-rw-r--r--tools/perf/benchmarks/smoothness.py52
-rw-r--r--tools/perf/benchmarks/spaceport.py6
-rw-r--r--tools/perf/benchmarks/speedometer.py6
-rw-r--r--tools/perf/benchmarks/start_with_url.py8
-rw-r--r--tools/perf/benchmarks/startup.py20
-rw-r--r--tools/perf/benchmarks/sunspider.py4
-rw-r--r--tools/perf/benchmarks/tab_switching.py18
-rw-r--r--tools/perf/benchmarks/thread_times.py14
-rw-r--r--tools/perf/benchmarks/webrtc.py4
-rw-r--r--tools/perf/measurements/rasterize_and_record_micro_unittest.py2
-rw-r--r--tools/perf/measurements/record_per_area_unittest.py2
-rw-r--r--tools/perf/measurements/repaint_unittest.py2
-rw-r--r--tools/perf/measurements/screenshot_unittest.py4
-rw-r--r--tools/perf/measurements/skpicture_printer_unittest.py2
-rw-r--r--tools/perf/measurements/thread_times_unittest.py2
-rw-r--r--tools/telemetry/telemetry/benchmark.py (renamed from tools/telemetry/telemetry/test.py)14
-rw-r--r--tools/telemetry/telemetry/core/backends/chrome/android_browser_finder_unittest.py4
-rw-r--r--tools/telemetry/telemetry/core/backends/chrome/cros_interface_unittest.py26
-rw-r--r--tools/telemetry/telemetry/core/backends/chrome/cros_unittest.py12
-rw-r--r--tools/telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py4
-rw-r--r--tools/telemetry/telemetry/core/backends/form_based_credentials_backend_unittest_base.py6
-rw-r--r--tools/telemetry/telemetry/core/bitmap_unittest.py16
-rw-r--r--tools/telemetry/telemetry/core/browser_unittest.py10
-rw-r--r--tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py6
-rw-r--r--tools/telemetry/telemetry/core/platform/mac_platform_backend_unittest.py4
-rw-r--r--tools/telemetry/telemetry/core/platform/posix_platform_backend_unittest.py4
-rw-r--r--tools/telemetry/telemetry/core/platform/power_monitor/powermetrics_power_monitor_unittest.py8
-rw-r--r--tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper_unittest.py8
-rw-r--r--tools/telemetry/telemetry/core/platform/profiler/android_systrace_profiler_unittest.py4
-rw-r--r--tools/telemetry/telemetry/core/tab_unittest.py6
-rw-r--r--tools/telemetry/telemetry/core/video_unittest.py4
-rw-r--r--tools/telemetry/telemetry/page/actions/action_runner_unittest.py4
-rw-r--r--tools/telemetry/telemetry/page/page_measurement_unittest.py4
-rwxr-xr-xtools/telemetry/telemetry/page/record_wpr.py4
-rw-r--r--tools/telemetry/telemetry/test_runner.py17
-rw-r--r--tools/telemetry/telemetry/util/find_dependencies.py4
-rw-r--r--tools/telemetry/telemetry/web_perf/timeline_based_measurement_unittest.py6
77 files changed, 309 insertions, 307 deletions
diff --git a/content/test/gpu/gpu_tests/cloud_storage_test_base.py b/content/test/gpu/gpu_tests/cloud_storage_test_base.py
index 9896930..0abbf61 100644
--- a/content/test/gpu/gpu_tests/cloud_storage_test_base.py
+++ b/content/test/gpu/gpu_tests/cloud_storage_test_base.py
@@ -9,7 +9,7 @@ import os
import re
import tempfile
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import bitmap
from telemetry.page import cloud_storage
from telemetry.page import page_test
@@ -215,7 +215,7 @@ class ValidatorBase(page_test.PageTest):
raise
-class TestBase(test.Test):
+class TestBase(benchmark.Benchmark):
@classmethod
def AddTestCommandLineArgs(cls, group):
group.add_option('--build-revision',
diff --git a/content/test/gpu/gpu_tests/context_lost.py b/content/test/gpu/gpu_tests/context_lost.py
index 092747a..886a561 100644
--- a/content/test/gpu/gpu_tests/context_lost.py
+++ b/content/test/gpu/gpu_tests/context_lost.py
@@ -3,7 +3,7 @@
# found in the LICENSE file.
import os
-from telemetry import test as test_module
+from telemetry import benchmark as benchmark_module
from telemetry.core import exceptions
from telemetry.core import util
from telemetry.page import page
@@ -174,7 +174,7 @@ class WebGLContextLostFromQuantityPage(page.Page):
action_runner.WaitForJavaScriptCondition(
'window.domAutomationController._loaded')
-class ContextLost(test_module.Test):
+class ContextLost(benchmark_module.Benchmark):
enabled = True
test = _ContextLostValidator
# For the record, this would have been another way to get the pages
diff --git a/content/test/gpu/gpu_tests/gpu_process.py b/content/test/gpu/gpu_tests/gpu_process.py
index cb07c55..1f06100 100644
--- a/content/test/gpu/gpu_tests/gpu_process.py
+++ b/content/test/gpu/gpu_tests/gpu_process.py
@@ -4,7 +4,7 @@
import gpu_process_expectations as expectations
import page_sets
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_set
from telemetry.page import page_test
@@ -33,7 +33,7 @@ class _GpuProcessValidator(page_test.PageTest):
if not has_gpu_process:
raise page_test.Failure('No GPU process detected')
-class GpuProcess(test.Test):
+class GpuProcess(benchmark.Benchmark):
"""Tests that accelerated content triggers the creation of a GPU process"""
test = _GpuProcessValidator
page_set = page_sets.GpuProcessTestsPageSet
diff --git a/content/test/gpu/gpu_tests/hardware_accelerated_feature.py b/content/test/gpu/gpu_tests/hardware_accelerated_feature.py
index a1f943b..2680df17 100644
--- a/content/test/gpu/gpu_tests/hardware_accelerated_feature.py
+++ b/content/test/gpu/gpu_tests/hardware_accelerated_feature.py
@@ -3,7 +3,7 @@
# found in the LICENSE file.
import hardware_accelerated_feature_expectations as expectations
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page as page_module
from telemetry.page import page_set
from telemetry.page import page_test
@@ -43,7 +43,7 @@ class ChromeGpuPage(page_module.Page):
self.feature = feature
self.script_to_evaluate_on_commit = test_harness_script
-class HardwareAcceleratedFeature(test.Test):
+class HardwareAcceleratedFeature(benchmark.Benchmark):
"""Tests GPU acceleration is reported as active for various features"""
test = _HardwareAcceleratedFeatureValidator
diff --git a/content/test/gpu/gpu_tests/maps.py b/content/test/gpu/gpu_tests/maps.py
index 87bc5e9..9c2ed36 100644
--- a/content/test/gpu/gpu_tests/maps.py
+++ b/content/test/gpu/gpu_tests/maps.py
@@ -13,7 +13,7 @@ import os
import cloud_storage_test_base
import maps_expectations
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import bitmap
from telemetry.core import util
from telemetry.page import page
diff --git a/content/test/gpu/gpu_tests/memory.py b/content/test/gpu/gpu_tests/memory.py
index 939af86..aa39267 100644
--- a/content/test/gpu/gpu_tests/memory.py
+++ b/content/test/gpu/gpu_tests/memory.py
@@ -4,7 +4,7 @@
import memory_expectations
import page_sets
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_test
from telemetry.timeline import counter
from telemetry.timeline import model
@@ -92,7 +92,7 @@ class _MemoryValidator(page_test.PageTest):
return 'Memory allocation too %s (was %d MB, should be %d MB +/- %d MB)' % (
low_or_high, mb_used, SINGLE_TAB_LIMIT_MB, WIGGLE_ROOM_MB)
-class Memory(test.Test):
+class Memory(benchmark.Benchmark):
"""Tests GPU memory limits"""
test = _MemoryValidator
page_set = page_sets.MemoryTestsPageSet
diff --git a/content/test/gpu/gpu_tests/pixel.py b/content/test/gpu/gpu_tests/pixel.py
index b772203a..e8bfa89 100644
--- a/content/test/gpu/gpu_tests/pixel.py
+++ b/content/test/gpu/gpu_tests/pixel.py
@@ -11,7 +11,7 @@ import cloud_storage_test_base
import page_sets
import pixel_expectations
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import bitmap
from telemetry.page import cloud_storage
from telemetry.page import page_test
diff --git a/content/test/gpu/gpu_tests/screenshot_sync.py b/content/test/gpu/gpu_tests/screenshot_sync.py
index 330968f..a787bce 100644
--- a/content/test/gpu/gpu_tests/screenshot_sync.py
+++ b/content/test/gpu/gpu_tests/screenshot_sync.py
@@ -5,7 +5,7 @@ import os
import screenshot_sync_expectations as expectations
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import util
from telemetry.page import page
from telemetry.page import page_set
@@ -16,7 +16,7 @@ from telemetry.page.actions.all_page_actions import *
data_path = os.path.join(
util.GetChromiumSrcDir(), 'content', 'test', 'data', 'gpu')
-@test.Disabled('mac')
+@benchmark.Disabled('mac')
class _ScreenshotSyncValidator(page_test.PageTest):
def CustomizeBrowserOptions(self, options):
options.AppendExtraBrowserArgs('--enable-gpu-benchmarking')
@@ -28,7 +28,7 @@ class _ScreenshotSyncValidator(page_test.PageTest):
raise page_test.Failure(message)
-@test.Disabled('mac')
+@benchmark.Disabled('mac')
class ScreenshotSyncPage(page.Page):
def __init__(self, page_set, base_dir):
super(ScreenshotSyncPage, self).__init__(
@@ -44,8 +44,8 @@ class ScreenshotSyncPage(page.Page):
'window.__testComplete', timeout_in_seconds=120)
-@test.Disabled('mac')
-class ScreenshotSyncProcess(test.Test):
+@benchmark.Disabled('mac')
+class ScreenshotSyncProcess(benchmark.Benchmark):
"""Tests that screenhots are properly synchronized with the frame one which
they were requested"""
test = _ScreenshotSyncValidator
diff --git a/content/test/gpu/gpu_tests/webgl_conformance.py b/content/test/gpu/gpu_tests/webgl_conformance.py
index 485e4ac..21a4200 100644
--- a/content/test/gpu/gpu_tests/webgl_conformance.py
+++ b/content/test/gpu/gpu_tests/webgl_conformance.py
@@ -8,7 +8,7 @@ import sys
import webgl_conformance_expectations
-from telemetry import test as test_module
+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
@@ -100,7 +100,7 @@ class WebglConformancePage(page_module.Page):
'webglTestHarness._finished', timeout_in_seconds=120)
-class WebglConformance(test_module.Test):
+class WebglConformance(benchmark_module.Benchmark):
"""Conformance with Khronos WebGL Conformance Tests"""
test = WebglConformanceValidator
diff --git a/content/test/gpu/gpu_tests/webgl_robustness.py b/content/test/gpu/gpu_tests/webgl_robustness.py
index 153bd31..df24fd0 100644
--- a/content/test/gpu/gpu_tests/webgl_robustness.py
+++ b/content/test/gpu/gpu_tests/webgl_robustness.py
@@ -1,7 +1,7 @@
# 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.
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page
from telemetry.page import page_set
from telemetry.page import page_test
@@ -60,7 +60,7 @@ class WebglRobustnessPage(page.Page):
action_runner.NavigateToPage(self)
action_runner.WaitForJavaScriptCondition('webglTestHarness._finished')
-class WebglRobustness(test.Test):
+class WebglRobustness(benchmark.Benchmark):
test = WebglConformanceValidator
def CreatePageSet(self, options):
diff --git a/tools/perf/benchmarks/benchmark_unittest.py b/tools/perf/benchmarks/benchmark_unittest.py
index a46b32a..196c15b 100644
--- a/tools/perf/benchmarks/benchmark_unittest.py
+++ b/tools/perf/benchmarks/benchmark_unittest.py
@@ -11,7 +11,7 @@ kind of smoke test.
import os
import unittest
-from telemetry import test
+from telemetry import benchmark as benchmark_module
from telemetry.core import discover
from telemetry.page import page_measurement
from telemetry.unittest import gtest_unittest_results
@@ -19,10 +19,10 @@ from telemetry.unittest import options_for_unittests
def SmokeTestGenerator(benchmark):
- # In general you should @test.Disabled individual benchmarks that fail,
- # instead of this entire smoke test suite.
+ # In general you should @benchmark_module.Disabled individual benchmarks that
+ # fail, instead of this entire smoke test suite.
# TODO(achuith): Multiple tests failing on CrOS. crbug.com/351114
- @test.Disabled('chromeos')
+ @benchmark_module.Disabled('chromeos')
def BenchmarkSmokeTest(self):
# Only measure a single page so that this test cycles reasonably quickly.
benchmark.options['pageset_repeat'] = 1
@@ -41,12 +41,12 @@ def SmokeTestGenerator(benchmark):
parser = options.CreateParser()
benchmark.AddCommandLineArgs(parser)
- test.AddCommandLineArgs(parser)
+ benchmark_module.AddCommandLineArgs(parser)
benchmark.SetArgumentDefaults(parser)
options.MergeDefaultValues(parser.get_default_values())
benchmark.ProcessCommandLineArgs(None, options)
- test.ProcessCommandLineArgs(None, options)
+ benchmark_module.ProcessCommandLineArgs(None, options)
self.assertEqual(0, SinglePageBenchmark().Run(options),
msg='Failed: %s' % benchmark)
@@ -65,8 +65,8 @@ def load_tests(_, _2, _3):
measurements_dir, top_level_dir, page_measurement.PageMeasurement,
pattern='*.py').values()
all_benchmarks = discover.DiscoverClasses(
- benchmarks_dir, top_level_dir, test.Test, pattern='*.py').values()
-
+ benchmarks_dir, top_level_dir, benchmark_module.Benchmark,
+ pattern='*.py').values()
for benchmark in all_benchmarks:
if benchmark.PageTestClass() not in all_measurements:
# If the benchmark is not in measurements, then it is not composable.
diff --git a/tools/perf/benchmarks/blink_perf.py b/tools/perf/benchmarks/blink_perf.py
index ae38e48..27692bb 100644
--- a/tools/perf/benchmarks/blink_perf.py
+++ b/tools/perf/benchmarks/blink_perf.py
@@ -4,7 +4,7 @@
import os
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import util
from telemetry.page import page_measurement
from telemetry.page import page_set
@@ -93,7 +93,7 @@ class _BlinkPerfMeasurement(page_measurement.PageMeasurement):
print log
-class BlinkPerfAll(test.Test):
+class BlinkPerfAll(benchmark.Benchmark):
tag = 'all'
test = _BlinkPerfMeasurement
@@ -102,7 +102,7 @@ class BlinkPerfAll(test.Test):
'third_party', 'WebKit', 'PerformanceTests')
return _CreatePageSetFromPath(path)
-class BlinkPerfAnimation(test.Test):
+class BlinkPerfAnimation(benchmark.Benchmark):
tag = 'animation'
test = _BlinkPerfMeasurement
diff --git a/tools/perf/benchmarks/browsermark.py b/tools/perf/benchmarks/browsermark.py
index 85953af..ebf7c11 100644
--- a/tools/perf/benchmarks/browsermark.py
+++ b/tools/perf/benchmarks/browsermark.py
@@ -20,7 +20,7 @@ tests are not included in this suite.
import os
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
from telemetry.page import page_set
@@ -44,7 +44,7 @@ class _BrowsermarkMeasurement(page_measurement.PageMeasurement):
results.Add('Score', 'score', result)
-class Browsermark(test.Test):
+class Browsermark(benchmark.Benchmark):
"""Browsermark suite tests CSS, DOM, resize, page load, WebGL and JS."""
test = _BrowsermarkMeasurement
def CreatePageSet(self, options):
diff --git a/tools/perf/benchmarks/canvasmark.py b/tools/perf/benchmarks/canvasmark.py
index f846101..5e2cec02 100644
--- a/tools/perf/benchmarks/canvasmark.py
+++ b/tools/perf/benchmarks/canvasmark.py
@@ -11,7 +11,7 @@ fills, shadows and text functions.
import os
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
from telemetry.page import page_set
@@ -46,7 +46,7 @@ class _CanvasMarkMeasurement(page_measurement.PageMeasurement):
results.Add('Score', 'score', total)
-class CanvasMark(test.Test):
+class CanvasMark(benchmark.Benchmark):
test = _CanvasMarkMeasurement
def CreatePageSet(self, options):
diff --git a/tools/perf/benchmarks/chrome_proxy.py b/tools/perf/benchmarks/chrome_proxy.py
index 9e79299..a42b265 100644
--- a/tools/perf/benchmarks/chrome_proxy.py
+++ b/tools/perf/benchmarks/chrome_proxy.py
@@ -2,13 +2,13 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-from telemetry import test
+from telemetry import benchmark
from measurements import chrome_proxy
import page_sets
-class ChromeProxyLatency(test.Test):
+class ChromeProxyLatency(benchmark.Benchmark):
tag = 'latency'
test = chrome_proxy.ChromeProxyLatency
page_set = page_sets.Top20PageSet
@@ -18,7 +18,7 @@ class ChromeProxyLatency(test.Test):
options.AppendExtraBrowserArgs('--enable-spdy-proxy-auth')
-class ChromeProxyLatencyDirect(test.Test):
+class ChromeProxyLatencyDirect(benchmark.Benchmark):
tag = 'latency_direct'
test = chrome_proxy.ChromeProxyLatency
page_set = page_sets.Top20PageSet
@@ -33,7 +33,7 @@ class ChromeProxyLatencySyntheticDirect(ChromeProxyLatencyDirect):
page_set = page_sets.SyntheticPageSet
-class ChromeProxyDataSaving(test.Test):
+class ChromeProxyDataSaving(benchmark.Benchmark):
tag = 'data_saving'
test = chrome_proxy.ChromeProxyDataSaving
page_set = page_sets.Top20PageSet
@@ -42,7 +42,7 @@ class ChromeProxyDataSaving(test.Test):
options.AppendExtraBrowserArgs('--enable-spdy-proxy-auth')
-class ChromeProxyDataSavingDirect(test.Test):
+class ChromeProxyDataSavingDirect(benchmark.Benchmark):
tag = 'data_saving_direct'
test = chrome_proxy.ChromeProxyDataSaving
page_set = page_sets.Top20PageSet
@@ -57,37 +57,37 @@ class ChromeProxyDataSavingSyntheticDirect(ChromeProxyDataSavingDirect):
page_set = page_sets.SyntheticPageSet
-class ChromeProxyHeaderValidation(test.Test):
+class ChromeProxyHeaderValidation(benchmark.Benchmark):
tag = 'header_validation'
test = chrome_proxy.ChromeProxyHeaders
page_set = page_sets.Top20PageSet
-class ChromeProxyBypass(test.Test):
+class ChromeProxyBypass(benchmark.Benchmark):
tag = 'bypass'
test = chrome_proxy.ChromeProxyBypass
page_set = page_sets.BypassPageSet
-class ChromeProxySafeBrowsing(test.Test):
+class ChromeProxySafeBrowsing(benchmark.Benchmark):
tag = 'safebrowsing'
test = chrome_proxy.ChromeProxySafebrowsing
page_set = page_sets.SafebrowsingPageSet
-class ChromeProxyHTTPFallbackProbeURL(test.Test):
+class ChromeProxyHTTPFallbackProbeURL(benchmark.Benchmark):
tag = 'fallback-probe'
test = chrome_proxy.ChromeProxyHTTPFallbackProbeURL
page_set = page_sets.SyntheticPageSet
-class ChromeProxyHTTPFallbackViaHeader(test.Test):
+class ChromeProxyHTTPFallbackViaHeader(benchmark.Benchmark):
tag = 'fallback-viaheader'
test = chrome_proxy.ChromeProxyHTTPFallbackViaHeader
page_set = page_sets.FallbackViaHeaderPageSet
-class ChromeProxySmoke(test.Test):
+class ChromeProxySmoke(benchmark.Benchmark):
tag = 'smoke'
test = chrome_proxy.ChromeProxySmoke
page_set = page_sets.SmokePageSet
diff --git a/tools/perf/benchmarks/dom_perf.py b/tools/perf/benchmarks/dom_perf.py
index b3d8735..b16047a 100644
--- a/tools/perf/benchmarks/dom_perf.py
+++ b/tools/perf/benchmarks/dom_perf.py
@@ -6,7 +6,7 @@ import json
import math
import os
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import util
from telemetry.page import page_measurement
from telemetry.page import page_set
@@ -69,8 +69,8 @@ class _DomPerfMeasurement(page_measurement.PageMeasurement):
total))
-@test.Disabled('android', 'linux')
-class DomPerf(test.Test):
+@benchmark.Disabled('android', 'linux')
+class DomPerf(benchmark.Benchmark):
"""A suite of JavaScript benchmarks for exercising the browser's DOM.
The final score is computed as the geometric mean of the individual results.
diff --git a/tools/perf/benchmarks/dromaeo.py b/tools/perf/benchmarks/dromaeo.py
index 775c9fe..7d0c8b2 100644
--- a/tools/perf/benchmarks/dromaeo.py
+++ b/tools/perf/benchmarks/dromaeo.py
@@ -6,7 +6,7 @@ import math
import os
from metrics import power
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
from telemetry.page import page_set
@@ -86,7 +86,7 @@ class _DromaeoMeasurement(page_measurement.PageMeasurement):
for key, value in aggregated.iteritems():
AddResult(key, math.exp(value['sum'] / value['count']))
-class _DromaeoBenchmark(test.Test):
+class _DromaeoBenchmark(benchmark.Benchmark):
"""A base class for Dromaeo benchmarks."""
test = _DromaeoMeasurement
@@ -112,7 +112,7 @@ class DromaeoDomCoreAttr(_DromaeoBenchmark):
query_param = 'dom-attr'
-@test.Disabled('xp') # crbug.com/323782
+@benchmark.Disabled('xp') # crbug.com/323782
class DromaeoDomCoreModify(_DromaeoBenchmark):
"""Dromaeo DOMCore modify JavaScript benchmark."""
tag = 'domcoremodify'
diff --git a/tools/perf/benchmarks/endure.py b/tools/perf/benchmarks/endure.py
index f8194a8..d719b53 100644
--- a/tools/perf/benchmarks/endure.py
+++ b/tools/perf/benchmarks/endure.py
@@ -10,13 +10,13 @@ page sets, and the statistics that are gathered are determined by the Endure
measurement class.
"""
-from telemetry import test
+from telemetry import benchmark
from measurements import endure
import page_sets
-class _EndureBenchmark(test.Test):
+class _EndureBenchmark(benchmark.Benchmark):
"""Base class which sets options for endure benchmarks below."""
test = endure.Endure
# Default options for endure benchmarks. Could be overridden in subclasses.
diff --git a/tools/perf/benchmarks/html5gaming.py b/tools/perf/benchmarks/html5gaming.py
index 98370b0..891703f 100644
--- a/tools/perf/benchmarks/html5gaming.py
+++ b/tools/perf/benchmarks/html5gaming.py
@@ -12,7 +12,7 @@ score is a indicator for the browser's ability to smoothly run HTML5 games."""
import os
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
from telemetry.page import page_set
@@ -28,7 +28,7 @@ class _HTML5GamingMeasurement(page_measurement.PageMeasurement):
results.Add('Score', 'score', result)
-class HTML5Gaming(test.Test):
+class HTML5Gaming(benchmark.Benchmark):
"""Imapct HTML5 smooth running games benchmark suite."""
test = _HTML5GamingMeasurement
def CreatePageSet(self, options):
diff --git a/tools/perf/benchmarks/image_decoding.py b/tools/perf/benchmarks/image_decoding.py
index 6e9f777..ae286b6 100644
--- a/tools/perf/benchmarks/image_decoding.py
+++ b/tools/perf/benchmarks/image_decoding.py
@@ -2,13 +2,13 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-from telemetry import test
+from telemetry import benchmark
from measurements import image_decoding
import page_sets
-class ImageDecodingToughImageCases(test.Test):
+class ImageDecodingToughImageCases(benchmark.Benchmark):
test = image_decoding.ImageDecoding
# TODO: Rename this page set to tough_image_cases.py
page_set = page_sets.ImageDecodingMeasurementPageSet
diff --git a/tools/perf/benchmarks/indexeddb_perf.py b/tools/perf/benchmarks/indexeddb_perf.py
index 5949f36..cad569b 100644
--- a/tools/perf/benchmarks/indexeddb_perf.py
+++ b/tools/perf/benchmarks/indexeddb_perf.py
@@ -25,7 +25,7 @@ import os
from metrics import memory
from metrics import power
from metrics import v8_object_stats
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import util
from telemetry.page import page_measurement
from telemetry.page import page_set
@@ -81,7 +81,7 @@ class _IndexedDbMeasurement(page_measurement.PageMeasurement):
power.PowerMetric.CustomizeBrowserOptions(options)
v8_object_stats.V8ObjectStatsMetric.CustomizeBrowserOptions(options)
-class IndexedDb(test.Test):
+class IndexedDb(benchmark.Benchmark):
"""Chromium's IndexedDB Performance tests."""
test = _IndexedDbMeasurement
diff --git a/tools/perf/benchmarks/jetstream.py b/tools/perf/benchmarks/jetstream.py
index 2e935df..98c4349 100644
--- a/tools/perf/benchmarks/jetstream.py
+++ b/tools/perf/benchmarks/jetstream.py
@@ -20,7 +20,7 @@ specialized optimization for one benchmark might make another benchmark slower.
import json
import os
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
from telemetry.page import page_set
from telemetry.util import statistics
@@ -69,8 +69,8 @@ class _JetstreamMeasurement(page_measurement.PageMeasurement):
scalar.ScalarValue(None, 'Score', 'score', total))
-@test.Disabled('android', 'xp') # crbug.com/381742
-class Jetstream(test.Test):
+@benchmark.Disabled('android', 'xp') # crbug.com/381742
+class Jetstream(benchmark.Benchmark):
test = _JetstreamMeasurement
def CreatePageSet(self, options):
diff --git a/tools/perf/benchmarks/jsgamebench.py b/tools/perf/benchmarks/jsgamebench.py
index 762e8ba..8d1c8c1 100644
--- a/tools/perf/benchmarks/jsgamebench.py
+++ b/tools/perf/benchmarks/jsgamebench.py
@@ -12,7 +12,7 @@ The benchmark is kept here for historical purposes but is disabled on the bots.
import os
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
from telemetry.page import page_set
@@ -31,8 +31,8 @@ class _JsgamebenchMeasurement(page_measurement.PageMeasurement):
results.Add('Score', 'score (bigger is better)', result)
-@test.Disabled
-class Jsgamebench(test.Test):
+@benchmark.Disabled
+class Jsgamebench(benchmark.Benchmark):
"""Counts how many animating sprites can move around on the screen at once."""
test = _JsgamebenchMeasurement
diff --git a/tools/perf/benchmarks/kraken.py b/tools/perf/benchmarks/kraken.py
index 4843115..fa0af6d 100644
--- a/tools/perf/benchmarks/kraken.py
+++ b/tools/perf/benchmarks/kraken.py
@@ -7,7 +7,7 @@
import os
from metrics import power
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
from telemetry.page import page_set
@@ -49,7 +49,7 @@ decodeURIComponent(formElement.value.split("?")[1]);
results.Add('Total', 'ms', total)
-class Kraken(test.Test):
+class Kraken(benchmark.Benchmark):
"""Mozilla's Kraken JavaScript benchmark."""
test = _KrakenMeasurement
diff --git a/tools/perf/benchmarks/maps.py b/tools/perf/benchmarks/maps.py
index 43f30d4..4f44007 100644
--- a/tools/perf/benchmarks/maps.py
+++ b/tools/perf/benchmarks/maps.py
@@ -8,7 +8,7 @@ Rerforms several common navigation actions on the map (pan, zoom, rotate)"""
import os
import re
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import util
from telemetry.page import page_measurement
from telemetry.page import page as page_module
@@ -42,8 +42,8 @@ class MapsPage(page_module.Page):
action_runner.WaitForJavaScriptCondition('window.testDone')
-@test.Disabled
-class MapsBenchmark(test.Test):
+@benchmark.Disabled
+class MapsBenchmark(benchmark.Benchmark):
"""Basic Google Maps benchmarks."""
test = _MapsMeasurement
diff --git a/tools/perf/benchmarks/media.py b/tools/perf/benchmarks/media.py
index a5edabd..8520468 100644
--- a/tools/perf/benchmarks/media.py
+++ b/tools/perf/benchmarks/media.py
@@ -4,7 +4,7 @@
from measurements import media
import page_sets
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
from telemetry.value import list_of_scalar_values
from telemetry.value import scalar
@@ -29,19 +29,19 @@ class _MSEMeasurement(page_measurement.PageMeasurement):
value=float(metrics[m]), important=True))
-class Media(test.Test):
+class Media(benchmark.Benchmark):
"""Obtains media metrics for key user scenarios."""
test = media.Media
page_set = page_sets.ToughVideoCasesPageSet
-class MediaNetworkSimulation(test.Test):
+class MediaNetworkSimulation(benchmark.Benchmark):
"""Obtains media metrics under different network simulations."""
test = media.Media
page_set = page_sets.MediaCnsCasesPageSet
-class MediaAndroid(test.Test):
+class MediaAndroid(benchmark.Benchmark):
"""Obtains media metrics for key user scenarios on Android."""
test = media.Media
tag = 'android'
@@ -50,7 +50,7 @@ class MediaAndroid(test.Test):
options = {'page_label_filter_exclude': 'is_4k,is_50fps'}
-class MediaChromeOS4kOnly(test.Test):
+class MediaChromeOS4kOnly(benchmark.Benchmark):
"""Benchmark for media performance on ChromeOS using only is_4k test content.
"""
test = media.Media
@@ -63,7 +63,7 @@ class MediaChromeOS4kOnly(test.Test):
}
-class MediaChromeOS(test.Test):
+class MediaChromeOS(benchmark.Benchmark):
"""Benchmark for media performance on all ChromeOS platforms.
This benchmark does not run is_4k content, there's a separate benchmark for
@@ -76,7 +76,7 @@ class MediaChromeOS(test.Test):
options = {'page_label_filter_exclude': 'is_4k,is_50fps'}
-class MediaSourceExtensions(test.Test):
+class MediaSourceExtensions(benchmark.Benchmark):
"""Obtains media metrics for key media source extensions functions."""
test = _MSEMeasurement
page_set = page_sets.MseCasesPageSet
diff --git a/tools/perf/benchmarks/memory.py b/tools/perf/benchmarks/memory.py
index 9d4a740..90752a7 100644
--- a/tools/perf/benchmarks/memory.py
+++ b/tools/perf/benchmarks/memory.py
@@ -1,30 +1,30 @@
# 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.
-from telemetry import test
+from telemetry import benchmark
from measurements import memory
import page_sets
-@test.Disabled('android') # crbug.com/370977
-class MemoryMobile(test.Test):
+@benchmark.Disabled('android') # crbug.com/370977
+class MemoryMobile(benchmark.Benchmark):
test = memory.Memory
page_set = page_sets.MobileMemoryPageSet
-class MemoryTop25(test.Test):
+class MemoryTop25(benchmark.Benchmark):
test = memory.Memory
page_set = page_sets.Top25PageSet
-class Reload2012Q3(test.Test):
+class Reload2012Q3(benchmark.Benchmark):
tag = 'reload'
test = memory.Memory
page_set = page_sets.Top2012Q3PageSet
-@test.Disabled('android') # crbug.com/371153
-class MemoryToughDomMemoryCases(test.Test):
+@benchmark.Disabled('android') # crbug.com/371153
+class MemoryToughDomMemoryCases(benchmark.Benchmark):
test = memory.Memory
page_set = page_sets.ToughDomMemoryCasesPageSet
diff --git a/tools/perf/benchmarks/memory_pressure.py b/tools/perf/benchmarks/memory_pressure.py
index fe00f47..6fc3d41 100644
--- a/tools/perf/benchmarks/memory_pressure.py
+++ b/tools/perf/benchmarks/memory_pressure.py
@@ -2,13 +2,13 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-from telemetry import test
+from telemetry import benchmark
from measurements import memory_pressure
import page_sets
-@test.Enabled('has tabs')
-class MemoryPressure(test.Test):
+@benchmark.Enabled('has tabs')
+class MemoryPressure(benchmark.Benchmark):
test = memory_pressure.MemoryPressure
page_set = page_sets.Typical25PageSet
options = {'pageset_repeat': 6}
diff --git a/tools/perf/benchmarks/octane.py b/tools/perf/benchmarks/octane.py
index c53b63b..dca1bce 100644
--- a/tools/perf/benchmarks/octane.py
+++ b/tools/perf/benchmarks/octane.py
@@ -14,7 +14,7 @@ Octane 2.0 consists of 17 tests, four more than Octane v1.
import os
from metrics import power
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
from telemetry.page import page_set
from telemetry.util import statistics
@@ -75,7 +75,7 @@ class _OctaneMeasurement(page_measurement.PageMeasurement):
scalar.ScalarValue(None, 'Total.Score', 'score', total))
-class Octane(test.Test):
+class Octane(benchmark.Benchmark):
"""Google's Octane JavaScript benchmark."""
test = _OctaneMeasurement
diff --git a/tools/perf/benchmarks/page_cycler.py b/tools/perf/benchmarks/page_cycler.py
index 4db9b27..1ee750b 100644
--- a/tools/perf/benchmarks/page_cycler.py
+++ b/tools/perf/benchmarks/page_cycler.py
@@ -4,67 +4,67 @@
from measurements import page_cycler
import page_sets
-from telemetry import test
+from telemetry import benchmark
-class PageCyclerBloat(test.Test):
+class PageCyclerBloat(benchmark.Benchmark):
test = page_cycler.PageCycler
page_set = page_sets.BloatPageSet
options = {'pageset_repeat': 10}
-class PageCyclerDhtml(test.Test):
+class PageCyclerDhtml(benchmark.Benchmark):
test = page_cycler.PageCycler
page_set = page_sets.DhtmlPageSet
options = {'pageset_repeat': 10}
-class PageCyclerIntlArFaHe(test.Test):
+class PageCyclerIntlArFaHe(benchmark.Benchmark):
test = page_cycler.PageCycler
page_set = page_sets.IntlArFaHePageSet
options = {'pageset_repeat': 10}
-@test.Disabled('win') # crbug.com/388337
-class PageCyclerIntlEsFrPtBr(test.Test):
+@benchmark.Disabled('win') # crbug.com/388337
+class PageCyclerIntlEsFrPtBr(benchmark.Benchmark):
test = page_cycler.PageCycler
page_set = page_sets.IntlEsFrPtBrPageSet
options = {'pageset_repeat': 10}
-class PageCyclerIntlHiRu(test.Test):
+class PageCyclerIntlHiRu(benchmark.Benchmark):
test = page_cycler.PageCycler
page_set = page_sets.IntlHiRuPageSet
options = {'pageset_repeat': 10}
-@test.Disabled('android', 'win') # crbug.com/379564, crbug.com/330909
-class PageCyclerIntlJaZh(test.Test):
+@benchmark.Disabled('android', 'win') # crbug.com/379564, crbug.com/330909
+class PageCyclerIntlJaZh(benchmark.Benchmark):
test = page_cycler.PageCycler
page_set = page_sets.IntlJaZhPageSet
options = {'pageset_repeat': 10}
-class PageCyclerIntlKoThVi(test.Test):
+class PageCyclerIntlKoThVi(benchmark.Benchmark):
test = page_cycler.PageCycler
page_set = page_sets.IntlKoThViPageSet
options = {'pageset_repeat': 10}
-class PageCyclerMorejs(test.Test):
+class PageCyclerMorejs(benchmark.Benchmark):
test = page_cycler.PageCycler
page_set = page_sets.MorejsPageSet
options = {'pageset_repeat': 10}
-class PageCyclerMoz(test.Test):
+class PageCyclerMoz(benchmark.Benchmark):
test = page_cycler.PageCycler
page_set = page_sets.MozPageSet
options = {'pageset_repeat': 10}
-@test.Disabled('linux', 'win') # crbug.com/353260
-class PageCyclerNetsimTop10(test.Test):
+@benchmark.Disabled('linux', 'win') # crbug.com/353260
+class PageCyclerNetsimTop10(benchmark.Benchmark):
"""Measures load time of the top 10 sites under simulated cable network."""
tag = 'netsim'
test = page_cycler.PageCycler
@@ -85,20 +85,20 @@ class PageCyclerNetsimTop10(test.Test):
self.test.clear_cache_before_each_run = True
-class PageCyclerTop10Mobile(test.Test):
+class PageCyclerTop10Mobile(benchmark.Benchmark):
test = page_cycler.PageCycler
page_set = page_sets.Top10MobilePageSet
options = {'pageset_repeat': 10}
-class PageCyclerKeyMobileSites(test.Test):
+class PageCyclerKeyMobileSites(benchmark.Benchmark):
test = page_cycler.PageCycler
page_set = page_sets.KeyMobileSitesPageSet
options = {'pageset_repeat': 10}
-@test.Disabled('android') # crbug.com/357326
-class PageCyclerToughLayoutCases(test.Test):
+@benchmark.Disabled('android') # crbug.com/357326
+class PageCyclerToughLayoutCases(benchmark.Benchmark):
test = page_cycler.PageCycler
page_set = page_sets.ToughLayoutCasesPageSet
options = {'pageset_repeat': 10}
@@ -106,8 +106,8 @@ class PageCyclerToughLayoutCases(test.Test):
# crbug.com/273986: This test is really flakey on xp.
# cabug.com/341843: This test is always timing out on Android.
-@test.Disabled('android', 'win')
-class PageCyclerTypical25(test.Test):
+@benchmark.Disabled('android', 'win')
+class PageCyclerTypical25(benchmark.Benchmark):
test = page_cycler.PageCycler
page_set = page_sets.Typical25PageSet
options = {'pageset_repeat': 10}
diff --git a/tools/perf/benchmarks/peacekeeper.py b/tools/perf/benchmarks/peacekeeper.py
index 4e4f7f3c..ff545a6 100644
--- a/tools/perf/benchmarks/peacekeeper.py
+++ b/tools/perf/benchmarks/peacekeeper.py
@@ -14,7 +14,7 @@ second depending on the test. Final Score is computed by calculating geometric
mean of individual tests scores.
"""
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
from telemetry.page import page_set
from telemetry.util import statistics
@@ -68,7 +68,7 @@ class _PeaceKeeperMeasurement(page_measurement.PageMeasurement):
scalar.ScalarValue(None, 'Total.Score', 'score', total))
-class PeaceKeeperBenchmark(test.Test):
+class PeaceKeeperBenchmark(benchmark.Benchmark):
"""A base class for Peackeeper benchmarks."""
test = _PeaceKeeperMeasurement
diff --git a/tools/perf/benchmarks/pica.py b/tools/perf/benchmarks/pica.py
index 64a8046..eff3866 100644
--- a/tools/perf/benchmarks/pica.py
+++ b/tools/perf/benchmarks/pica.py
@@ -3,7 +3,7 @@
# found in the LICENSE file.
import page_sets
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
class _PicaMeasurement(page_measurement.PageMeasurement):
@@ -17,6 +17,6 @@ class _PicaMeasurement(page_measurement.PageMeasurement):
results.Add('Total', 'ms', result)
-class Pica(test.Test):
+class Pica(benchmark.Benchmark):
test = _PicaMeasurement
page_set = page_sets.PicaPageSet
diff --git a/tools/perf/benchmarks/polymer_load.py b/tools/perf/benchmarks/polymer_load.py
index c225e2b..015c5bd 100644
--- a/tools/perf/benchmarks/polymer_load.py
+++ b/tools/perf/benchmarks/polymer_load.py
@@ -4,10 +4,10 @@
import page_sets
from measurements import polymer_load
-from telemetry import test
+from telemetry import benchmark
-class PolymerLoadPica(test.Test):
+class PolymerLoadPica(benchmark.Benchmark):
"""Measures time to polymer-ready for PICA
"""
test = polymer_load.PolymerLoadMeasurement
diff --git a/tools/perf/benchmarks/rasterize_and_record_micro.py b/tools/perf/benchmarks/rasterize_and_record_micro.py
index f0dd5315..7ced8fa 100644
--- a/tools/perf/benchmarks/rasterize_and_record_micro.py
+++ b/tools/perf/benchmarks/rasterize_and_record_micro.py
@@ -5,13 +5,13 @@
from benchmarks import silk_flags
from measurements import rasterize_and_record_micro
import page_sets
-from telemetry import test
+from telemetry import benchmark
# RasterizeAndRecord disabled on mac because of crbug.com/350684.
# RasterizeAndRecord disabled on windows because of crbug.com/338057.
-@test.Disabled('mac', 'win')
-class RasterizeAndRecordMicroTop25(test.Test):
+@benchmark.Disabled('mac', 'win')
+class RasterizeAndRecordMicroTop25(benchmark.Benchmark):
"""Measures rasterize and record performance on the top 25 web pages.
http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
@@ -19,8 +19,8 @@ class RasterizeAndRecordMicroTop25(test.Test):
page_set = page_sets.Top25PageSet
-@test.Disabled('mac', 'win')
-class RasterizeAndRecordMicroKeyMobileSites(test.Test):
+@benchmark.Disabled('mac', 'win')
+class RasterizeAndRecordMicroKeyMobileSites(benchmark.Benchmark):
"""Measures rasterize and record performance on the key mobile sites.
http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
@@ -28,8 +28,8 @@ class RasterizeAndRecordMicroKeyMobileSites(test.Test):
page_set = page_sets.KeyMobileSitesPageSet
-@test.Disabled('mac', 'win')
-class RasterizeAndRecordMicroKeySilkCases(test.Test):
+@benchmark.Disabled('mac', 'win')
+class RasterizeAndRecordMicroKeySilkCases(benchmark.Benchmark):
"""Measures rasterize and record performance on the silk sites.
http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
@@ -37,8 +37,9 @@ class RasterizeAndRecordMicroKeySilkCases(test.Test):
page_set = page_sets.KeySilkCasesPageSet
-@test.Disabled('mac', 'win')
-class RasterizeAndRecordMicroFastPathGpuRasterizationKeySilkCases(test.Test):
+@benchmark.Disabled('mac', 'win')
+class RasterizeAndRecordMicroFastPathGpuRasterizationKeySilkCases(
+ benchmark.Benchmark):
"""Measures rasterize and record performance on the silk sites.
Uses GPU rasterization together with bleeding edge rendering fast paths.
@@ -52,8 +53,8 @@ class RasterizeAndRecordMicroFastPathGpuRasterizationKeySilkCases(test.Test):
silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
-@test.Enabled('android')
-class RasterizeAndRecordMicroPolymer(test.Test):
+@benchmark.Enabled('android')
+class RasterizeAndRecordMicroPolymer(benchmark.Benchmark):
"""Measures rasterize and record performance on the Polymer cases.
http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
diff --git a/tools/perf/benchmarks/repaint.py b/tools/perf/benchmarks/repaint.py
index c262d94..b7d6b8a 100644
--- a/tools/perf/benchmarks/repaint.py
+++ b/tools/perf/benchmarks/repaint.py
@@ -5,10 +5,10 @@
from benchmarks import silk_flags
from measurements import repaint
import page_sets
-from telemetry import test
+from telemetry import benchmark
-class RepaintKeyMobileSites(test.Test):
+class RepaintKeyMobileSites(benchmark.Benchmark):
"""Measures repaint performance on the key mobile sites.
http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
@@ -16,7 +16,7 @@ class RepaintKeyMobileSites(test.Test):
page_set = page_sets.KeyMobileSitesPageSet
-class RepaintGpuRasterizationKeyMobileSites(test.Test):
+class RepaintGpuRasterizationKeyMobileSites(benchmark.Benchmark):
"""Measures repaint performance on the key mobile sites with forced GPU
rasterization.
diff --git a/tools/perf/benchmarks/robohornet_pro.py b/tools/perf/benchmarks/robohornet_pro.py
index 99f3dc4..d532e60 100644
--- a/tools/perf/benchmarks/robohornet_pro.py
+++ b/tools/perf/benchmarks/robohornet_pro.py
@@ -7,7 +7,7 @@
import os
from metrics import power
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
from telemetry.page import page_set
@@ -36,7 +36,7 @@ class _RobohornetProMeasurement(page_measurement.PageMeasurement):
results.Add('Total', 'ms', result)
-class RobohornetPro(test.Test):
+class RobohornetPro(benchmark.Benchmark):
test = _RobohornetProMeasurement
def CreatePageSet(self, options):
diff --git a/tools/perf/benchmarks/scheduler.py b/tools/perf/benchmarks/scheduler.py
index fc5cb6b..6929d70 100644
--- a/tools/perf/benchmarks/scheduler.py
+++ b/tools/perf/benchmarks/scheduler.py
@@ -2,12 +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 test
+from telemetry import benchmark
from measurements import smoothness
import page_sets
-class SchedulerToughSchedulingCases(test.Test):
+class SchedulerToughSchedulingCases(benchmark.Benchmark):
"""Measures rendering statistics while interacting with pages that have
challenging scheduling properties.
@@ -18,8 +18,8 @@ class SchedulerToughSchedulingCases(test.Test):
# Pepper plugin is not supported on android.
-@test.Disabled('android', 'win') # crbug.com/384733
-class SchedulerToughPepperCases(test.Test):
+@benchmark.Disabled('android', 'win') # crbug.com/384733
+class SchedulerToughPepperCases(benchmark.Benchmark):
"""Measures rendering statistics while interacting with pages that have
pepper plugins"""
test = smoothness.Smoothness
diff --git a/tools/perf/benchmarks/scirra.py b/tools/perf/benchmarks/scirra.py
index b3ba56c..e01bf0f 100644
--- a/tools/perf/benchmarks/scirra.py
+++ b/tools/perf/benchmarks/scirra.py
@@ -10,7 +10,7 @@ represented onscreen when the animation reaches the 30 FPS threshold.
import os
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
from telemetry.page import page_set
@@ -50,7 +50,7 @@ class _ScirraMeasurement(page_measurement.PageMeasurement):
results.Add('Count', 'count', total)
-class ScirraBenchmark(test.Test):
+class ScirraBenchmark(benchmark.Benchmark):
"""WebGL and Canvas2D rendering benchmark suite."""
test = _ScirraMeasurement
def CreatePageSet(self, options):
diff --git a/tools/perf/benchmarks/service_worker.py b/tools/perf/benchmarks/service_worker.py
index 08517ef..d166451 100644
--- a/tools/perf/benchmarks/service_worker.py
+++ b/tools/perf/benchmarks/service_worker.py
@@ -3,7 +3,7 @@
# found in the LICENSE file.
import page_sets
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
@@ -20,6 +20,6 @@ class _ServiceWorkerMeasurement(page_measurement.PageMeasurement):
results.Add(key, value['units'], value['value'])
-class ServiceWorkerPerfTest(test.Test):
+class ServiceWorkerPerfTest(benchmark.Benchmark):
test = _ServiceWorkerMeasurement
page_set = page_sets.ServiceWorkerPageSet
diff --git a/tools/perf/benchmarks/session_restore.py b/tools/perf/benchmarks/session_restore.py
index 9641ba8..d6e9099 100644
--- a/tools/perf/benchmarks/session_restore.py
+++ b/tools/perf/benchmarks/session_restore.py
@@ -9,11 +9,11 @@ from measurements import session_restore
from measurements import session_restore_with_url
import page_sets
from profile_creators import small_profile_creator
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import profile_generator
-class _SessionRestoreTest(test.Test):
+class _SessionRestoreTest(benchmark.Benchmark):
@classmethod
def ProcessCommandLineArgs(cls, parser, args):
@@ -30,7 +30,7 @@ class _SessionRestoreTest(test.Test):
args.browser_options.profile_dir = os.path.join(profile_dir, profile_type)
-@test.Disabled('android', 'linux') # crbug.com/325479, crbug.com/381990
+@benchmark.Disabled('android', 'linux') # crbug.com/325479, crbug.com/381990
class SessionRestoreColdTypical25(_SessionRestoreTest):
tag = 'cold'
test = session_restore.SessionRestore
@@ -39,7 +39,7 @@ class SessionRestoreColdTypical25(_SessionRestoreTest):
'pageset_repeat': 5}
-@test.Disabled('android', 'linux') # crbug.com/325479, crbug.com/381990
+@benchmark.Disabled('android', 'linux') # crbug.com/325479, crbug.com/381990
class SessionRestoreWarmTypical25(_SessionRestoreTest):
tag = 'warm'
test = session_restore.SessionRestore
@@ -48,7 +48,7 @@ class SessionRestoreWarmTypical25(_SessionRestoreTest):
'pageset_repeat': 20}
-@test.Disabled('android', 'linux') # crbug.com/325479, crbug.com/381990
+@benchmark.Disabled('android', 'linux') # crbug.com/325479, crbug.com/381990
class SessionRestoreWithUrlCold(_SessionRestoreTest):
"""Measure Chrome cold session restore with startup URLs."""
tag = 'cold'
@@ -58,7 +58,7 @@ class SessionRestoreWithUrlCold(_SessionRestoreTest):
'pageset_repeat': 5}
-@test.Disabled('android', 'linux') # crbug.com/325479, crbug.com/381990
+@benchmark.Disabled('android', 'linux') # crbug.com/325479, crbug.com/381990
class SessionRestoreWithUrlWarm(_SessionRestoreTest):
"""Measure Chrome warm session restore with startup URLs."""
tag = 'warm'
diff --git a/tools/perf/benchmarks/smoothness.py b/tools/perf/benchmarks/smoothness.py
index 93a2027..88cdf28 100644
--- a/tools/perf/benchmarks/smoothness.py
+++ b/tools/perf/benchmarks/smoothness.py
@@ -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 telemetry import test
+from telemetry import benchmark
from benchmarks import silk_flags
from measurements import smoothness
import page_sets
-class SmoothnessTop25(test.Test):
+class SmoothnessTop25(benchmark.Benchmark):
"""Measures rendering statistics while scrolling down the top 25 web pages.
http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
@@ -17,24 +17,24 @@ class SmoothnessTop25(test.Test):
page_set = page_sets.Top25PageSet
-@test.Disabled('mac') # crbug.com/388877
-class SmoothnessToughCanvasCases(test.Test):
+@benchmark.Disabled('mac') # crbug.com/388877
+class SmoothnessToughCanvasCases(benchmark.Benchmark):
test = smoothness.Smoothness
page_set = page_sets.ToughCanvasCasesPageSet
-@test.Disabled # crbug.com/373812
-class SmoothnessToughWebGLCases(test.Test):
+@benchmark.Disabled # crbug.com/373812
+class SmoothnessToughWebGLCases(benchmark.Benchmark):
test = smoothness.Smoothness
page_set = page_sets.ToughWebglCasesPageSet
-class SmoothnessMaps(test.Test):
+class SmoothnessMaps(benchmark.Benchmark):
test = smoothness.Smoothness
page_set = page_sets.MapsPageSet
-class SmoothnessKeyMobileSites(test.Test):
+class SmoothnessKeyMobileSites(benchmark.Benchmark):
"""Measures rendering statistics while scrolling down the key mobile sites.
http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
@@ -42,13 +42,13 @@ class SmoothnessKeyMobileSites(test.Test):
page_set = page_sets.KeyMobileSitesPageSet
-@test.Disabled('android') # crbug.com/350692
-class SmoothnessToughAnimationCases(test.Test):
+@benchmark.Disabled('android') # crbug.com/350692
+class SmoothnessToughAnimationCases(benchmark.Benchmark):
test = smoothness.Smoothness
page_set = page_sets.ToughAnimationCasesPageSet
-class SmoothnessKeySilkCases(test.Test):
+class SmoothnessKeySilkCases(benchmark.Benchmark):
"""Measures rendering statistics for the key silk cases without GPU
rasterization
"""
@@ -56,7 +56,7 @@ class SmoothnessKeySilkCases(test.Test):
page_set = page_sets.KeySilkCasesPageSet
-class SmoothnessFastPathKeySilkCases(test.Test):
+class SmoothnessFastPathKeySilkCases(benchmark.Benchmark):
"""Measures rendering statistics for the key silk cases without GPU
rasterization using bleeding edge rendering fast paths.
"""
@@ -67,8 +67,8 @@ class SmoothnessFastPathKeySilkCases(test.Test):
silk_flags.CustomizeBrowserOptionsForFastPath(options)
-@test.Disabled('android') # crbug.com/363783
-class SmoothnessGpuRasterizationTop25(test.Test):
+@benchmark.Disabled('android') # crbug.com/363783
+class SmoothnessGpuRasterizationTop25(benchmark.Benchmark):
"""Measures rendering statistics for the top 25 with GPU rasterization
"""
tag = 'gpu_rasterization'
@@ -78,8 +78,8 @@ class SmoothnessGpuRasterizationTop25(test.Test):
silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
-@test.Disabled('android') # crbug.com/363783
-class SmoothnessGpuRasterizationKeyMobileSites(test.Test):
+@benchmark.Disabled('android') # crbug.com/363783
+class SmoothnessGpuRasterizationKeyMobileSites(benchmark.Benchmark):
"""Measures rendering statistics for the key mobile sites with GPU
rasterization
"""
@@ -90,7 +90,7 @@ class SmoothnessGpuRasterizationKeyMobileSites(test.Test):
silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
-class SmoothnessGpuRasterizationKeySilkCases(test.Test):
+class SmoothnessGpuRasterizationKeySilkCases(benchmark.Benchmark):
"""Measures rendering statistics for the key silk cases with GPU rasterization
"""
tag = 'gpu_rasterization'
@@ -114,8 +114,8 @@ class SmoothnessFastPathGpuRasterizationKeySilkCases(
silk_flags.CustomizeBrowserOptionsForFastPath(options)
-@test.Enabled('android')
-class SmoothnessToughPinchZoomCases(test.Test):
+@benchmark.Enabled('android')
+class SmoothnessToughPinchZoomCases(benchmark.Benchmark):
"""Measures rendering statistics for pinch-zooming into the tough pinch zoom
cases
"""
@@ -123,16 +123,16 @@ class SmoothnessToughPinchZoomCases(test.Test):
page_set = page_sets.ToughPinchZoomCasesPageSet
-@test.Disabled # crbug.com/370725
-class SmoothnessPolymer(test.Test):
+@benchmark.Disabled # crbug.com/370725
+class SmoothnessPolymer(benchmark.Benchmark):
"""Measures rendering statistics for Polymer cases.
"""
test = smoothness.Smoothness
page_set = page_sets.PolymerPageSet
-@test.Disabled # crbug.com/370725
-class SmoothnessFastPathPolymer(test.Test):
+@benchmark.Disabled # crbug.com/370725
+class SmoothnessFastPathPolymer(benchmark.Benchmark):
"""Measures rendering statistics for the Polymer cases without GPU
rasterization using bleeding edge rendering fast paths.
"""
@@ -143,8 +143,8 @@ class SmoothnessFastPathPolymer(test.Test):
silk_flags.CustomizeBrowserOptionsForFastPath(options)
-@test.Disabled # crbug.com/370725
-class SmoothnessGpuRasterizationPolymer(test.Test):
+@benchmark.Disabled # crbug.com/370725
+class SmoothnessGpuRasterizationPolymer(benchmark.Benchmark):
"""Measures rendering statistics for the Polymer cases with GPU rasterization
"""
tag = 'gpu_rasterization'
@@ -154,7 +154,7 @@ class SmoothnessGpuRasterizationPolymer(test.Test):
silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
-@test.Disabled # crbug.com/370725
+@benchmark.Disabled # crbug.com/370725
class SmoothnessFastPathGpuRasterizationPolymer(
SmoothnessGpuRasterizationPolymer):
"""Measures rendering statistics for the Polymer cases with GPU rasterization
diff --git a/tools/perf/benchmarks/spaceport.py b/tools/perf/benchmarks/spaceport.py
index cd4d773..4c37838 100644
--- a/tools/perf/benchmarks/spaceport.py
+++ b/tools/perf/benchmarks/spaceport.py
@@ -7,7 +7,7 @@
import logging
import os
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import util
from telemetry.page import page_measurement
from telemetry.page import page_set
@@ -56,8 +56,8 @@ class _SpaceportMeasurement(page_measurement.PageMeasurement):
# crbug.com/166703: This test frequently times out on Windows.
-@test.Disabled('mac', 'win')
-class Spaceport(test.Test):
+@benchmark.Disabled('mac', 'win')
+class Spaceport(benchmark.Benchmark):
"""spaceport.io's PerfMarks benchmark."""
test = _SpaceportMeasurement
diff --git a/tools/perf/benchmarks/speedometer.py b/tools/perf/benchmarks/speedometer.py
index 260d55e..5de0c1e 100644
--- a/tools/perf/benchmarks/speedometer.py
+++ b/tools/perf/benchmarks/speedometer.py
@@ -18,7 +18,7 @@ engine, CSS style resolution, layout, and other technologies.
import os
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
from telemetry.page import page_set
@@ -34,8 +34,8 @@ class SpeedometerMeasurement(page_measurement.PageMeasurement):
'Total', 'ms', tab.EvaluateJavaScript('benchmarkClient._timeValues'))
-@test.Disabled('android') # Times out
-class Speedometer(test.Test):
+@benchmark.Disabled('android') # Times out
+class Speedometer(benchmark.Benchmark):
test = SpeedometerMeasurement
def CreatePageSet(self, options):
diff --git a/tools/perf/benchmarks/start_with_url.py b/tools/perf/benchmarks/start_with_url.py
index 20d65e9..b4700e6c 100644
--- a/tools/perf/benchmarks/start_with_url.py
+++ b/tools/perf/benchmarks/start_with_url.py
@@ -1,14 +1,14 @@
# 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 import test
+from telemetry import benchmark
from measurements import startup
import page_sets
-@test.Disabled('snowleopard') # crbug.com/336913
-class StartWithUrlCold(test.Test):
+@benchmark.Disabled('snowleopard') # crbug.com/336913
+class StartWithUrlCold(benchmark.Benchmark):
"""Measure time to start Chrome cold with startup URLs"""
tag = 'cold'
test = startup.StartWithUrl
@@ -16,7 +16,7 @@ class StartWithUrlCold(test.Test):
options = {'cold': True,
'pageset_repeat': 5}
-class StartWithUrlWarm(test.Test):
+class StartWithUrlWarm(benchmark.Benchmark):
"""Measure time to start Chrome warm with startup URLs"""
tag = 'warm'
test = startup.StartWithUrl
diff --git a/tools/perf/benchmarks/startup.py b/tools/perf/benchmarks/startup.py
index 5c80987..c8372fc 100644
--- a/tools/perf/benchmarks/startup.py
+++ b/tools/perf/benchmarks/startup.py
@@ -1,14 +1,14 @@
# 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.
-from telemetry import test
+from telemetry import benchmark
from measurements import startup
import page_sets
-@test.Disabled('snowleopard') # crbug.com/336913
-class StartupColdBlankPage(test.Test):
+@benchmark.Disabled('snowleopard') # crbug.com/336913
+class StartupColdBlankPage(benchmark.Benchmark):
tag = 'cold'
test = startup.Startup
page_set = page_sets.BlankPageSet
@@ -16,15 +16,15 @@ class StartupColdBlankPage(test.Test):
'pageset_repeat': 5}
-class StartupWarmBlankPage(test.Test):
+class StartupWarmBlankPage(benchmark.Benchmark):
tag = 'warm'
test = startup.Startup
page_set = page_sets.BlankPageSet
options = {'warm': True,
'pageset_repeat': 20}
-@test.Disabled('snowleopard') # crbug.com/336913
-class StartupColdTheme(test.Test):
+@benchmark.Disabled('snowleopard') # crbug.com/336913
+class StartupColdTheme(benchmark.Benchmark):
tag = 'theme_cold'
test = startup.Startup
page_set = page_sets.BlankPageSet
@@ -33,7 +33,7 @@ class StartupColdTheme(test.Test):
'pageset_repeat': 5}
-class StartupWarmTheme(test.Test):
+class StartupWarmTheme(benchmark.Benchmark):
tag = 'theme_warm'
test = startup.Startup
page_set = page_sets.BlankPageSet
@@ -41,8 +41,8 @@ class StartupWarmTheme(test.Test):
options = {'warm': True,
'pageset_repeat': 20}
-@test.Disabled('snowleopard') # crbug.com/336913
-class StartupColdManyExtensions(test.Test):
+@benchmark.Disabled('snowleopard') # crbug.com/336913
+class StartupColdManyExtensions(benchmark.Benchmark):
tag = 'many_extensions_cold'
test = startup.Startup
page_set = page_sets.BlankPageSet
@@ -51,7 +51,7 @@ class StartupColdManyExtensions(test.Test):
'pageset_repeat': 5}
-class StartupWarmManyExtensions(test.Test):
+class StartupWarmManyExtensions(benchmark.Benchmark):
tag = 'many_extensions_warm'
test = startup.Startup
page_set = page_sets.BlankPageSet
diff --git a/tools/perf/benchmarks/sunspider.py b/tools/perf/benchmarks/sunspider.py
index 776eee2..62a6a50 100644
--- a/tools/perf/benchmarks/sunspider.py
+++ b/tools/perf/benchmarks/sunspider.py
@@ -6,7 +6,7 @@ import json
import os
from metrics import power
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement
from telemetry.page import page_set
@@ -51,7 +51,7 @@ class _SunspiderMeasurement(page_measurement.PageMeasurement):
results.Add('Total', 'ms', totals)
-class Sunspider(test.Test):
+class Sunspider(benchmark.Benchmark):
"""Apple's SunSpider JavaScript benchmark."""
test = _SunspiderMeasurement
diff --git a/tools/perf/benchmarks/tab_switching.py b/tools/perf/benchmarks/tab_switching.py
index a79ab52..a1cb74c 100644
--- a/tools/perf/benchmarks/tab_switching.py
+++ b/tools/perf/benchmarks/tab_switching.py
@@ -2,33 +2,33 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-from telemetry import test
+from telemetry import benchmark
from measurements import tab_switching
import page_sets
-@test.Enabled('has tabs')
-class TabSwitchingTop10(test.Test):
+@benchmark.Enabled('has tabs')
+class TabSwitchingTop10(benchmark.Benchmark):
test = tab_switching.TabSwitching
page_set = page_sets.Top10PageSet
-@test.Enabled('has tabs')
-class TabSwitchingTypical25(test.Test):
+@benchmark.Enabled('has tabs')
+class TabSwitchingTypical25(benchmark.Benchmark):
test = tab_switching.TabSwitching
page_set = page_sets.Typical25PageSet
-@test.Enabled('has tabs')
-class TabSwitchingFiveBlankTabs(test.Test):
+@benchmark.Enabled('has tabs')
+class TabSwitchingFiveBlankTabs(benchmark.Benchmark):
test = tab_switching.TabSwitching
page_set = page_sets.FiveBlankPagesPageSet
options = {'pageset_repeat': 10}
-@test.Enabled('has tabs')
-class TabSwitchingToughEnergyCases(test.Test):
+@benchmark.Enabled('has tabs')
+class TabSwitchingToughEnergyCases(benchmark.Benchmark):
test = tab_switching.TabSwitching
page_set = page_sets.ToughEnergyCasesPageSet
options = {'pageset_repeat': 10}
diff --git a/tools/perf/benchmarks/thread_times.py b/tools/perf/benchmarks/thread_times.py
index 65c33a7..1ae79c6 100644
--- a/tools/perf/benchmarks/thread_times.py
+++ b/tools/perf/benchmarks/thread_times.py
@@ -1,14 +1,14 @@
# 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 import test
+from telemetry import benchmark
from benchmarks import silk_flags
from measurements import thread_times
import page_sets
-class ThreadTimesKeySilkCases(test.Test):
+class ThreadTimesKeySilkCases(benchmark.Benchmark):
"""Measures timeline metrics while performing smoothness action on key silk
cases."""
test = thread_times.ThreadTimes
@@ -16,7 +16,7 @@ class ThreadTimesKeySilkCases(test.Test):
options = {"report_silk_results": True}
-class ThreadTimesFastPathKeySilkCases(test.Test):
+class ThreadTimesFastPathKeySilkCases(benchmark.Benchmark):
"""Measures timeline metrics while performing smoothness action on key silk
cases using bleeding edge rendering fast paths."""
tag = 'fast_path'
@@ -34,7 +34,7 @@ class LegacySilkBenchmark(ThreadTimesKeySilkCases):
return "silk.key_silk_cases"
-class ThreadTimesFastPathMobileSites(test.Test):
+class ThreadTimesFastPathMobileSites(benchmark.Benchmark):
"""Measures timeline metrics while performing smoothness action on
key mobile sites labeled with fast-path tag.
http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
@@ -43,7 +43,7 @@ class ThreadTimesFastPathMobileSites(test.Test):
options = {'page_label_filter' : 'fastpath'}
-class ThreadTimesCompositorCases(test.Test):
+class ThreadTimesCompositorCases(benchmark.Benchmark):
"""Measures timeline metrics while performing smoothness action on
tough compositor cases.
http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
@@ -51,8 +51,8 @@ class ThreadTimesCompositorCases(test.Test):
page_set = page_sets.ToughCompositorCasesPageSet
-@test.Enabled('android')
-class ThreadTimesPolymer(test.Test):
+@benchmark.Enabled('android')
+class ThreadTimesPolymer(benchmark.Benchmark):
"""Measures timeline metrics while performing smoothness action on
Polymer cases."""
test = thread_times.ThreadTimes
diff --git a/tools/perf/benchmarks/webrtc.py b/tools/perf/benchmarks/webrtc.py
index 9095a78c..a9a7b30 100644
--- a/tools/perf/benchmarks/webrtc.py
+++ b/tools/perf/benchmarks/webrtc.py
@@ -4,10 +4,10 @@
from measurements import webrtc
import page_sets
-from telemetry import test
+from telemetry import benchmark
-class WebRTC(test.Test):
+class WebRTC(benchmark.Benchmark):
"""Obtains WebRTC metrics for a real-time video tests."""
test = webrtc.WebRTC
page_set = page_sets.WebrtcCasesPageSet
diff --git a/tools/perf/measurements/rasterize_and_record_micro_unittest.py b/tools/perf/measurements/rasterize_and_record_micro_unittest.py
index 65610fa..3543d61 100644
--- a/tools/perf/measurements/rasterize_and_record_micro_unittest.py
+++ b/tools/perf/measurements/rasterize_and_record_micro_unittest.py
@@ -5,10 +5,10 @@
import logging
from measurements import rasterize_and_record_micro
-from telemetry import test
from telemetry.core import wpr_modes
from telemetry.page import page_measurement_unittest_base
from telemetry.page import page_test
+from telemetry.unittest import test
from telemetry.unittest import options_for_unittests
diff --git a/tools/perf/measurements/record_per_area_unittest.py b/tools/perf/measurements/record_per_area_unittest.py
index 127b003..76e614d 100644
--- a/tools/perf/measurements/record_per_area_unittest.py
+++ b/tools/perf/measurements/record_per_area_unittest.py
@@ -3,9 +3,9 @@
# found in the LICENSE file.
from measurements import record_per_area
-from telemetry import test
from telemetry.core import wpr_modes
from telemetry.page import page_measurement_unittest_base
+from telemetry.unittest import test
from telemetry.unittest import options_for_unittests
diff --git a/tools/perf/measurements/repaint_unittest.py b/tools/perf/measurements/repaint_unittest.py
index e1fc76f..d874f4b3 100644
--- a/tools/perf/measurements/repaint_unittest.py
+++ b/tools/perf/measurements/repaint_unittest.py
@@ -3,13 +3,13 @@
# found in the LICENSE file.
from measurements import repaint
-from telemetry import test
from telemetry.core import wpr_modes
from telemetry.page import page_measurement_unittest_base
from telemetry.page import page as page_module
# pylint: disable=W0401,W0614
from telemetry.page.actions.all_page_actions import *
from telemetry.unittest import options_for_unittests
+from telemetry.unittest import test
class TestRepaintPage(page_module.Page):
diff --git a/tools/perf/measurements/screenshot_unittest.py b/tools/perf/measurements/screenshot_unittest.py
index 6e837e9..0addf1c 100644
--- a/tools/perf/measurements/screenshot_unittest.py
+++ b/tools/perf/measurements/screenshot_unittest.py
@@ -7,7 +7,7 @@ import shutil
import tempfile
from measurements import screenshot
-from telemetry import test
+from telemetry import benchmark
from telemetry.page import page_measurement_unittest_base
from telemetry.page import page_test
from telemetry.unittest import options_for_unittests
@@ -22,7 +22,7 @@ class ScreenshotUnitTest(
def tearDown(self):
shutil.rmtree(self._options.png_outdir)
- @test.Disabled('win') # http://crbug.com/386572
+ @benchmark.Disabled('win') # http://crbug.com/386572
def testScreenshot(self):
ps = self.CreatePageSetFromFileInUnittestDataDir('blank.html')
measurement = screenshot.Screenshot()
diff --git a/tools/perf/measurements/skpicture_printer_unittest.py b/tools/perf/measurements/skpicture_printer_unittest.py
index cc762b8..e7871db 100644
--- a/tools/perf/measurements/skpicture_printer_unittest.py
+++ b/tools/perf/measurements/skpicture_printer_unittest.py
@@ -6,9 +6,9 @@ import shutil
import tempfile
from measurements import skpicture_printer
-from telemetry import test
from telemetry.page import page_measurement_unittest_base
from telemetry.unittest import options_for_unittests
+from telemetry.unittest import test
class SkpicturePrinterUnitTest(
diff --git a/tools/perf/measurements/thread_times_unittest.py b/tools/perf/measurements/thread_times_unittest.py
index cc27498..b0103ea 100644
--- a/tools/perf/measurements/thread_times_unittest.py
+++ b/tools/perf/measurements/thread_times_unittest.py
@@ -5,11 +5,11 @@
from measurements import thread_times
from measurements import smoothness_unittest
from metrics import timeline
-from telemetry import test
from telemetry.core import wpr_modes
from telemetry.page import page_measurement_unittest_base
from telemetry.unittest import options_for_unittests
+from telemetry.unittest import test
diff --git a/tools/telemetry/telemetry/test.py b/tools/telemetry/telemetry/benchmark.py
index 4df4bde..5f3c75d 100644
--- a/tools/telemetry/telemetry/test.py
+++ b/tools/telemetry/telemetry/benchmark.py
@@ -1,4 +1,4 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
+# 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.
@@ -25,8 +25,8 @@ Disabled = decorators.Disabled
Enabled = decorators.Enabled
-class Test(command_line.Command):
- """Base class for a Telemetry test or benchmark.
+class Benchmark(command_line.Command):
+ """Base class for a Telemetry benchmark.
A test packages a PageTest/PageMeasurement and a PageSet together.
"""
@@ -153,9 +153,9 @@ class Test(command_line.Command):
@classmethod
def PageTestClass(cls):
- """Get the PageTest for this Test.
+ """Get the PageTest for this Benchmark.
- If the Test has no PageTest, raises NotImplementedError.
+ If the Benchmark has no PageTest, raises NotImplementedError.
"""
if not hasattr(cls, 'test'):
raise NotImplementedError('This test has no "test" attribute.')
@@ -165,9 +165,9 @@ class Test(command_line.Command):
@classmethod
def PageSetClass(cls):
- """Get the PageSet for this Test.
+ """Get the PageSet for this Benchmark.
- If the Test has no PageSet, raises NotImplementedError.
+ If the Benchmark has no PageSet, raises NotImplementedError.
"""
if not hasattr(cls, 'page_set'):
raise NotImplementedError('This test has no "page_set" attribute.')
diff --git a/tools/telemetry/telemetry/core/backends/chrome/android_browser_finder_unittest.py b/tools/telemetry/telemetry/core/backends/chrome/android_browser_finder_unittest.py
index a33266e..af26584 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/android_browser_finder_unittest.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/android_browser_finder_unittest.py
@@ -4,7 +4,7 @@
import unittest
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import browser_options
from telemetry.core.backends.chrome import android_browser_finder
from telemetry.unittest import system_stub
@@ -73,7 +73,7 @@ class AndroidBrowserFinderTest(unittest.TestCase):
self.assertEquals(1, len(log_stub.warnings))
self.assertEquals(0, len(browsers))
- @test.Disabled('chromeos')
+ @benchmark.Disabled('chromeos')
def test_adb_one_device(self):
finder_options = browser_options.BrowserFinderOptions()
diff --git a/tools/telemetry/telemetry/core/backends/chrome/cros_interface_unittest.py b/tools/telemetry/telemetry/core/backends/chrome/cros_interface_unittest.py
index 896cb6b..e382a51 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/cros_interface_unittest.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/cros_interface_unittest.py
@@ -10,7 +10,7 @@ import socket
import tempfile
import unittest
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import forwarders
from telemetry.core.backends.chrome import cros_interface
from telemetry.core.forwarders import cros_forwarder
@@ -19,7 +19,7 @@ from telemetry.unittest import options_for_unittests
class CrOSInterfaceTest(unittest.TestCase):
- @test.Enabled('cros-chrome')
+ @benchmark.Enabled('cros-chrome')
def testPushContents(self):
remote = options_for_unittests.GetCopy().cros_remote
cri = cros_interface.CrOSInterface(
@@ -30,7 +30,7 @@ class CrOSInterfaceTest(unittest.TestCase):
contents = cri.GetFileContents('/tmp/testPushContents')
self.assertEquals(contents, 'hello world')
- @test.Enabled('cros-chrome')
+ @benchmark.Enabled('cros-chrome')
def testExists(self):
remote = options_for_unittests.GetCopy().cros_remote
cri = cros_interface.CrOSInterface(
@@ -40,14 +40,14 @@ class CrOSInterfaceTest(unittest.TestCase):
self.assertTrue(cri.FileExistsOnDevice('/etc/passwd'))
self.assertFalse(cri.FileExistsOnDevice('/etc/sdlfsdjflskfjsflj'))
- @test.Enabled('linux')
+ @benchmark.Enabled('linux')
def testExistsLocal(self):
cri = cros_interface.CrOSInterface()
self.assertTrue(cri.FileExistsOnDevice('/proc/cpuinfo'))
self.assertTrue(cri.FileExistsOnDevice('/etc/passwd'))
self.assertFalse(cri.FileExistsOnDevice('/etc/sdlfsdjflskfjsflj'))
- @test.Enabled('cros-chrome')
+ @benchmark.Enabled('cros-chrome')
def testGetFileContents(self): # pylint: disable=R0201
remote = options_for_unittests.GetCopy().cros_remote
cri = cros_interface.CrOSInterface(
@@ -56,7 +56,7 @@ class CrOSInterfaceTest(unittest.TestCase):
hosts = cri.GetFileContents('/etc/lsb-release')
self.assertTrue('CHROMEOS' in hosts)
- @test.Enabled('cros-chrome')
+ @benchmark.Enabled('cros-chrome')
def testGetFileContentsNonExistent(self):
remote = options_for_unittests.GetCopy().cros_remote
cri = cros_interface.CrOSInterface(
@@ -69,7 +69,7 @@ class CrOSInterfaceTest(unittest.TestCase):
OSError,
lambda: cri.GetFileContents(f.name))
- @test.Enabled('cros-chrome')
+ @benchmark.Enabled('cros-chrome')
def testGetFile(self): # pylint: disable=R0201
remote = options_for_unittests.GetCopy().cros_remote
cri = cros_interface.CrOSInterface(
@@ -81,7 +81,7 @@ class CrOSInterfaceTest(unittest.TestCase):
res = f2.read()
self.assertTrue('CHROMEOS' in res)
- @test.Enabled('cros-chrome')
+ @benchmark.Enabled('cros-chrome')
def testGetFileNonExistent(self):
remote = options_for_unittests.GetCopy().cros_remote
cri = cros_interface.CrOSInterface(
@@ -94,7 +94,7 @@ class CrOSInterfaceTest(unittest.TestCase):
OSError,
lambda: cri.GetFile(f.name))
- @test.Enabled('cros-chrome')
+ @benchmark.Enabled('cros-chrome')
def testIsServiceRunning(self):
remote = options_for_unittests.GetCopy().cros_remote
cri = cros_interface.CrOSInterface(
@@ -103,12 +103,12 @@ class CrOSInterfaceTest(unittest.TestCase):
self.assertTrue(cri.IsServiceRunning('openssh-server'))
- @test.Enabled('linux')
+ @benchmark.Enabled('linux')
def testIsServiceRunningLocal(self):
cri = cros_interface.CrOSInterface()
self.assertTrue(cri.IsServiceRunning('dbus'))
- @test.Enabled('cros-chrome')
+ @benchmark.Enabled('cros-chrome')
def testGetRemotePortAndIsHTTPServerRunningOnPort(self):
remote = options_for_unittests.GetCopy().cros_remote
cri = cros_interface.CrOSInterface(
@@ -145,7 +145,7 @@ class CrOSInterfaceTest(unittest.TestCase):
# longer in use.
self.assertFalse(cri.IsHTTPServerRunningOnPort(remote_port))
- @test.Enabled('cros-chrome')
+ @benchmark.Enabled('cros-chrome')
def testGetRemotePortReservedPorts(self):
remote = options_for_unittests.GetCopy().cros_remote
cri = cros_interface.CrOSInterface(
@@ -161,7 +161,7 @@ class CrOSInterfaceTest(unittest.TestCase):
# TODO(tengs): It would be best if we can filter this test and other tests
# that need to be run locally based on the platform of the system browser.
- @test.Enabled('linux')
+ @benchmark.Enabled('linux')
def testEscapeCmdArguments(self):
''' Commands and their arguments that are executed through the cros
interface should follow bash syntax. This test needs to run on remotely
diff --git a/tools/telemetry/telemetry/core/backends/chrome/cros_unittest.py b/tools/telemetry/telemetry/core/backends/chrome/cros_unittest.py
index 9111920..63ce4ec 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/cros_unittest.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/cros_unittest.py
@@ -4,14 +4,14 @@
import logging
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import exceptions
from telemetry.core import util
from telemetry.core.backends.chrome import cros_test_case
class CrOSCryptohomeTest(cros_test_case.CrOSTestCase):
- @test.Enabled('chromeos')
+ @benchmark.Enabled('chromeos')
def testCryptohome(self):
"""Verifies cryptohome mount status for regular and guest user and when
logged out"""
@@ -36,7 +36,7 @@ class CrOSCryptohomeTest(cros_test_case.CrOSTestCase):
class CrOSLoginTest(cros_test_case.CrOSTestCase):
- @test.Enabled('chromeos')
+ @benchmark.Enabled('chromeos')
def testLoginStatus(self):
"""Tests autotestPrivate.loginStatus"""
if self._is_guest:
@@ -50,7 +50,7 @@ class CrOSLoginTest(cros_test_case.CrOSTestCase):
self.assertEquals(login_status['email'], self._username)
self.assertFalse(login_status['isScreenLocked'])
- @test.Enabled('chromeos')
+ @benchmark.Enabled('chromeos')
def testLogout(self):
"""Tests autotestPrivate.logout"""
if self._is_guest:
@@ -64,7 +64,7 @@ class CrOSLoginTest(cros_test_case.CrOSTestCase):
pass
util.WaitFor(lambda: not self._IsCryptohomeMounted(), 20)
- @test.Enabled('chromeos')
+ @benchmark.Enabled('chromeos')
def testGaiaLogin(self):
"""Tests gaia login. Credentials are expected to be found in a
credentials.txt file, with a single line of format username:password."""
@@ -121,7 +121,7 @@ class CrOSScreenLockerTest(cros_test_case.CrOSTestCase):
util.WaitFor(lambda: not browser.oobe_exists, 10)
self.assertFalse(self._IsScreenLocked(browser))
- @test.Enabled('chromeos')
+ @benchmark.Enabled('chromeos')
def testScreenLock(self):
"""Tests autotestPrivate.screenLock"""
if self._is_guest:
diff --git a/tools/telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py b/tools/telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py
index 37fb4a6..4177795 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py
@@ -2,13 +2,13 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-from telemetry import test
+from telemetry import benchmark
from telemetry.unittest import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
- @test.Enabled('has tabs')
+ @benchmark.Enabled('has tabs')
def testGetDOMStats(self):
# Due to an issue with CrOS, we create a new tab here rather than
# using the existing tab to get a consistent starting page on all platforms.
diff --git a/tools/telemetry/telemetry/core/backends/form_based_credentials_backend_unittest_base.py b/tools/telemetry/telemetry/core/backends/form_based_credentials_backend_unittest_base.py
index 483ce2b..3ce0c86 100644
--- a/tools/telemetry/telemetry/core/backends/form_based_credentials_backend_unittest_base.py
+++ b/tools/telemetry/telemetry/core/backends/form_based_credentials_backend_unittest_base.py
@@ -6,7 +6,7 @@ import logging
import os
import unittest
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import browser_finder
from telemetry.core import util
from telemetry.unittest import options_for_unittests
@@ -28,7 +28,7 @@ class FormBasedCredentialsBackendUnitTestBase(unittest.TestCase):
def setUp(self):
self._credentials_type = None
- @test.Disabled
+ @benchmark.Disabled
def testRealLoginIfPossible(self):
credentials_path = _GetCredentialsPath()
if not credentials_path:
@@ -43,7 +43,7 @@ class FormBasedCredentialsBackendUnitTestBase(unittest.TestCase):
ret = b.credentials.LoginNeeded(b.tabs[0], self._credentials_type)
self.assertTrue(ret)
- @test.Disabled
+ @benchmark.Disabled
def testRealLoginWithDontOverrideProfileIfPossible(self):
credentials_path = _GetCredentialsPath()
if not credentials_path:
diff --git a/tools/telemetry/telemetry/core/bitmap_unittest.py b/tools/telemetry/telemetry/core/bitmap_unittest.py
index 1045614..8613b14 100644
--- a/tools/telemetry/telemetry/core/bitmap_unittest.py
+++ b/tools/telemetry/telemetry/core/bitmap_unittest.py
@@ -6,7 +6,7 @@ import tempfile
import os
import unittest
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import bitmap
from telemetry.core import util
@@ -97,7 +97,7 @@ class BitmapTest(unittest.TestCase):
new_file = bitmap.Bitmap.FromPngFile(temp_file)
self.assertTrue(orig.IsEqual(new_file))
- @test.Disabled
+ @benchmark.Disabled
def testWriteCroppedBmpToPngFile(self):
pixels = [255,0,0, 255,255,0, 0,0,0,
255,255,0, 0,255,0, 0,0,0]
@@ -143,7 +143,7 @@ class BitmapTest(unittest.TestCase):
diff_bmp.GetPixelColor(2, 1).AssertIsRGB(255, 255, 255)
diff_bmp.GetPixelColor(2, 2).AssertIsRGB(255, 255, 255)
- @test.Disabled
+ @benchmark.Disabled
def testGetBoundingBox(self):
pixels = [0,0,0, 0,0,0, 0,0,0, 0,0,0,
0,0,0, 1,0,0, 1,0,0, 0,0,0,
@@ -157,7 +157,7 @@ class BitmapTest(unittest.TestCase):
self.assertEquals(box, None)
self.assertEquals(count, 0)
- @test.Disabled
+ @benchmark.Disabled
def testCrop(self):
pixels = [0,0,0, 1,0,0, 2,0,0, 3,0,0,
0,1,0, 1,1,0, 2,1,0, 3,1,0,
@@ -171,7 +171,7 @@ class BitmapTest(unittest.TestCase):
bmp.GetPixelColor(1, 0).AssertIsRGB(2, 2, 0)
self.assertEquals(bmp.pixels, bytearray([1,2,0, 2,2,0]))
- @test.Disabled
+ @benchmark.Disabled
def testHistogram(self):
pixels = [1,2,3, 1,2,3, 1,2,3, 1,2,3,
1,2,3, 8,7,6, 5,4,6, 1,2,3,
@@ -191,7 +191,7 @@ class BitmapTest(unittest.TestCase):
self.assertEquals(histogram.b[3], 0)
self.assertEquals(histogram.b[6], 4)
- @test.Disabled
+ @benchmark.Disabled
def testHistogramIgnoreColor(self):
pixels = [1,2,3, 1,2,3, 1,2,3, 1,2,3,
1,2,3, 8,7,6, 5,4,6, 1,2,3,
@@ -208,7 +208,7 @@ class BitmapTest(unittest.TestCase):
self.assertEquals(histogram.b[3], 0)
self.assertEquals(histogram.b[6], 4)
- @test.Disabled
+ @benchmark.Disabled
def testHistogramIgnoreColorTolerance(self):
pixels = [1,2,3, 4,5,6,
7,8,9, 8,7,6]
@@ -228,7 +228,7 @@ class BitmapTest(unittest.TestCase):
self.assertEquals(histogram.b[6], 2)
self.assertEquals(histogram.b[9], 1)
- @test.Disabled
+ @benchmark.Disabled
def testHistogramDistanceIgnoreColor(self):
pixels = [1,2,3, 1,2,3,
1,2,3, 1,2,3]
diff --git a/tools/telemetry/telemetry/core/browser_unittest.py b/tools/telemetry/telemetry/core/browser_unittest.py
index 646dff5..eeb3d8d 100644
--- a/tools/telemetry/telemetry/core/browser_unittest.py
+++ b/tools/telemetry/telemetry/core/browser_unittest.py
@@ -5,7 +5,7 @@
import logging
import unittest
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import browser_finder
from telemetry.core import gpu_device
from telemetry.core import gpu_info
@@ -76,7 +76,7 @@ class BrowserTest(unittest.TestCase):
v = b._browser_backend.chrome_branch_number # pylint: disable=W0212
self.assertTrue(v > 0)
- @test.Enabled('has tabs')
+ @benchmark.Enabled('has tabs')
def testNewCloseTab(self):
b = self.CreateBrowser()
existing_tab = b.tabs[0]
@@ -103,8 +103,8 @@ class BrowserTest(unittest.TestCase):
tab.Navigate(b.http_server.UrlOf('blank.html'))
b.tabs[0].WaitForDocumentReadyStateToBeInteractiveOrBetter()
- @test.Enabled('has tabs')
- @test.Disabled('win') # crbug.com/321527
+ @benchmark.Enabled('has tabs')
+ @benchmark.Disabled('win') # crbug.com/321527
def testCloseReferencedTab(self):
b = self.CreateBrowser()
b.tabs.New()
@@ -113,7 +113,7 @@ class BrowserTest(unittest.TestCase):
tab.Close()
self.assertEquals(1, len(b.tabs))
- @test.Enabled('has tabs')
+ @benchmark.Enabled('has tabs')
def testForegroundTab(self):
b = self.CreateBrowser()
# Should be only one tab at this stage, so that must be the foreground tab
diff --git a/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py b/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py
index 3a47b315..c196c4d 100644
--- a/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py
+++ b/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py
@@ -4,7 +4,7 @@
import unittest
-from telemetry import test
+from telemetry import benchmark
from telemetry.core.platform import android_platform_backend
from telemetry.unittest import system_stub
@@ -43,7 +43,7 @@ class AndroidPlatformBackendTest(unittest.TestCase):
def tearDown(self):
self._stubs.Restore()
- @test.Disabled('chromeos')
+ @benchmark.Disabled('chromeos')
def testGetCpuStats(self):
proc_stat_content = [
'7702 (.android.chrome) S 167 167 0 0 -1 1077936448 '
@@ -57,7 +57,7 @@ class AndroidPlatformBackendTest(unittest.TestCase):
cpu_stats = backend.GetCpuStats('7702')
self.assertEquals(cpu_stats, {'CpuProcessTime': 5.0})
- @test.Disabled('chromeos')
+ @benchmark.Disabled('chromeos')
def testGetCpuStatsInvalidPID(self):
# Mock an empty /proc/pid/stat.
adb_empty_proc_stat = MockDevice(MockAdbCommands([], {}))
diff --git a/tools/telemetry/telemetry/core/platform/mac_platform_backend_unittest.py b/tools/telemetry/telemetry/core/platform/mac_platform_backend_unittest.py
index 56932e6..cd7f961 100644
--- a/tools/telemetry/telemetry/core/platform/mac_platform_backend_unittest.py
+++ b/tools/telemetry/telemetry/core/platform/mac_platform_backend_unittest.py
@@ -5,7 +5,7 @@
import os
import unittest
-from telemetry import test
+from telemetry import benchmark
from telemetry.core.platform import factory
from telemetry.core.platform import platform_backend
@@ -22,7 +22,7 @@ class MacPlatformBackendTest(unittest.TestCase):
'mavericks2')
self.assertEqual(platform_backend.LION.upper(), 'LION')
- @test.Enabled('mac')
+ @benchmark.Enabled('mac')
def testGetCPUStats(self):
backend = factory.GetPlatformBackendForCurrentOS()
diff --git a/tools/telemetry/telemetry/core/platform/posix_platform_backend_unittest.py b/tools/telemetry/telemetry/core/platform/posix_platform_backend_unittest.py
index b41cd52..2908e7e 100644
--- a/tools/telemetry/telemetry/core/platform/posix_platform_backend_unittest.py
+++ b/tools/telemetry/telemetry/core/platform/posix_platform_backend_unittest.py
@@ -5,7 +5,7 @@ import os
import sys
import unittest
-from telemetry import test
+from telemetry import benchmark
from telemetry.core.platform import factory
from telemetry.core.platform import posix_platform_backend
@@ -51,7 +51,7 @@ class PosixPlatformBackendTest(unittest.TestCase):
result = backend.GetChildPids(1)
self.assertEquals(set(result), set([2, 3]))
- @test.Enabled('linux', 'mac')
+ @benchmark.Enabled('linux', 'mac')
def testIsApplicationRunning(self):
backend = factory.GetPlatformBackendForCurrentOS()
diff --git a/tools/telemetry/telemetry/core/platform/power_monitor/powermetrics_power_monitor_unittest.py b/tools/telemetry/telemetry/core/platform/power_monitor/powermetrics_power_monitor_unittest.py
index 8323ff8..a3788f0 100644
--- a/tools/telemetry/telemetry/core/platform/power_monitor/powermetrics_power_monitor_unittest.py
+++ b/tools/telemetry/telemetry/core/platform/power_monitor/powermetrics_power_monitor_unittest.py
@@ -6,7 +6,7 @@ import logging
import os
import unittest
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import util
from telemetry.core.platform import mac_platform_backend
from telemetry.core.platform import platform_backend
@@ -14,7 +14,7 @@ from telemetry.core.platform.power_monitor import powermetrics_power_monitor
class PowerMetricsPowerMonitorTest(unittest.TestCase):
- @test.Enabled('mac')
+ @benchmark.Enabled('mac')
def testCanMonitorPowerUsage(self):
backend = mac_platform_backend.MacPlatformBackend()
power_monitor = powermetrics_power_monitor.PowerMetricsPowerMonitor(backend)
@@ -24,13 +24,13 @@ class PowerMetricsPowerMonitorTest(unittest.TestCase):
self.assertEqual(power_monitor.CanMonitorPower(), mavericks_or_later,
"Error checking powermetrics availability: '%s'" % '|'.join(os.uname()))
- @test.Enabled('mac')
+ @benchmark.Enabled('mac')
def testParseEmptyPowerMetricsOutput(self):
# Important to handle zero length powermetrics outout - crbug.com/353250 .
self.assertIsNone(powermetrics_power_monitor.PowerMetricsPowerMonitor.
ParsePowerMetricsOutput(''))
- @test.Enabled('mac')
+ @benchmark.Enabled('mac')
def testParsePowerMetricsOutput(self):
def getOutput(output_file):
test_data_path = os.path.join(util.GetUnittestDataDir(), output_file)
diff --git a/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper_unittest.py b/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper_unittest.py
index 5a23dbb..1b839fd 100644
--- a/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper_unittest.py
+++ b/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper_unittest.py
@@ -8,7 +8,7 @@ import re
import shutil
import tempfile
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import util
from telemetry.core.platform.profiler import android_profiling_helper
from telemetry.unittest import simple_mock
@@ -63,7 +63,7 @@ class TestAndroidProfilingHelper(tab_test_case.TabTestCase):
finally:
android_profiling_helper.subprocess = real_subprocess
- @test.Enabled('android')
+ @benchmark.Enabled('android')
def testGetRequiredLibrariesForVTuneProfile(self):
vtune_db_output = os.path.join(
util.GetUnittestDataDir(), 'sample_vtune_db_output')
@@ -94,7 +94,7 @@ class TestAndroidProfilingHelper(tab_test_case.TabTestCase):
finally:
android_profiling_helper.sqlite3 = real_sqlite3
- @test.Enabled('android')
+ @benchmark.Enabled('android')
def testCreateSymFs(self):
# pylint: disable=W0212
browser_pid = self._browser._browser_backend.pid
@@ -123,7 +123,7 @@ class TestAndroidProfilingHelper(tab_test_case.TabTestCase):
finally:
shutil.rmtree(symfs_dir)
- @test.Enabled('android')
+ @benchmark.Enabled('android')
def testGetToolchainBinaryPath(self):
with tempfile.NamedTemporaryFile() as libc:
self._device.old_interface.PullFileFromDevice('/system/lib/libc.so',
diff --git a/tools/telemetry/telemetry/core/platform/profiler/android_systrace_profiler_unittest.py b/tools/telemetry/telemetry/core/platform/profiler/android_systrace_profiler_unittest.py
index 6b84a21..a17b650 100644
--- a/tools/telemetry/telemetry/core/platform/profiler/android_systrace_profiler_unittest.py
+++ b/tools/telemetry/telemetry/core/platform/profiler/android_systrace_profiler_unittest.py
@@ -6,13 +6,13 @@ import shutil
import tempfile
import zipfile
-from telemetry import test
+from telemetry import benchmark
from telemetry.core.platform.profiler import android_systrace_profiler
from telemetry.unittest import tab_test_case
class TestAndroidSystraceProfiler(tab_test_case.TabTestCase):
- @test.Enabled('android')
+ @benchmark.Enabled('android')
def testSystraceProfiler(self):
try:
out_dir = tempfile.mkdtemp()
diff --git a/tools/telemetry/telemetry/core/tab_unittest.py b/tools/telemetry/telemetry/core/tab_unittest.py
index 5b179ca..53db433 100644
--- a/tools/telemetry/telemetry/core/tab_unittest.py
+++ b/tools/telemetry/telemetry/core/tab_unittest.py
@@ -4,7 +4,7 @@
import logging
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import bitmap
from telemetry.core import video
from telemetry.core import util
@@ -57,7 +57,7 @@ class TabTest(tab_test_case.TabTestCase):
lambda: self._tab.Navigate('chrome://crash',
timeout=5))
- @test.Enabled('has tabs')
+ @benchmark.Enabled('has tabs')
def testActivateTab(self):
util.WaitFor(lambda: _IsDocumentVisible(self._tab), timeout=5)
new_tab = self._browser.tabs.New()
@@ -155,7 +155,7 @@ class GpuTabTest(tab_test_case.TabTestCase):
super(GpuTabTest, self).setUp()
# Test flaky on mac: http://crbug.com/358664
- @test.Disabled('android', 'mac')
+ @benchmark.Disabled('android', 'mac')
def testScreenshot(self):
if not self._tab.screenshot_supported:
logging.warning('Browser does not support screenshots, skipping test.')
diff --git a/tools/telemetry/telemetry/core/video_unittest.py b/tools/telemetry/telemetry/core/video_unittest.py
index 5e3e80d..aa4ddbe 100644
--- a/tools/telemetry/telemetry/core/video_unittest.py
+++ b/tools/telemetry/telemetry/core/video_unittest.py
@@ -6,7 +6,7 @@ import logging
import os
import unittest
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import bitmap
from telemetry.core import platform
from telemetry.core import util
@@ -15,7 +15,7 @@ from telemetry.core import video
class VideoTest(unittest.TestCase) :
- @test.Disabled
+ @benchmark.Disabled
def testFramesFromMp4(self):
host_platform = platform.GetHostPlatform()
diff --git a/tools/telemetry/telemetry/page/actions/action_runner_unittest.py b/tools/telemetry/telemetry/page/actions/action_runner_unittest.py
index 5401e34..6fae287 100644
--- a/tools/telemetry/telemetry/page/actions/action_runner_unittest.py
+++ b/tools/telemetry/telemetry/page/actions/action_runner_unittest.py
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import exceptions
from telemetry.core import util
from telemetry.core.backends.chrome import tracing_backend
@@ -158,7 +158,7 @@ class ActionRunnerTest(tab_test_case.TabTestCase):
action_runner.ClickElement('#notfound')
self.assertRaises(exceptions.EvaluateException, WillFail)
- @test.Disabled('debug')
+ @benchmark.Disabled('debug')
def testTapElement(self):
self.Navigate('page_with_clickables.html')
action_runner = action_runner_module.ActionRunner(self._tab)
diff --git a/tools/telemetry/telemetry/page/page_measurement_unittest.py b/tools/telemetry/telemetry/page/page_measurement_unittest.py
index 7134c9d..e30155e 100644
--- a/tools/telemetry/telemetry/page/page_measurement_unittest.py
+++ b/tools/telemetry/telemetry/page/page_measurement_unittest.py
@@ -5,7 +5,7 @@
import json
import os
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import exceptions
from telemetry.core import wpr_modes
from telemetry.page import page as page_module
@@ -104,7 +104,7 @@ class PageMeasurementUnitTest(
# This test is disabled because it runs against live sites, and needs to be
# fixed. crbug.com/179038
- @test.Disabled
+ @benchmark.Disabled
def testRecordAndReplay(self):
test_archive = '/tmp/google.wpr'
google_url = 'http://www.google.com/'
diff --git a/tools/telemetry/telemetry/page/record_wpr.py b/tools/telemetry/telemetry/page/record_wpr.py
index 6936f45..bbef6fb 100755
--- a/tools/telemetry/telemetry/page/record_wpr.py
+++ b/tools/telemetry/telemetry/page/record_wpr.py
@@ -8,7 +8,7 @@ import sys
import tempfile
import time
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import browser_options
from telemetry.core import discover
from telemetry.core import wpr_modes
@@ -88,7 +88,7 @@ def Main(base_dir):
# Filter out unneeded ProfileCreators (crbug.com/319573).
if not issubclass(cls, profile_creator.ProfileCreator)
}
- tests = discover.DiscoverClasses(base_dir, base_dir, test.Test,
+ tests = discover.DiscoverClasses(base_dir, base_dir, benchmark.Benchmark,
index_by_class_name=True)
options = browser_options.BrowserFinderOptions()
diff --git a/tools/telemetry/telemetry/test_runner.py b/tools/telemetry/telemetry/test_runner.py
index ffee8fc..2a15978 100644
--- a/tools/telemetry/telemetry/test_runner.py
+++ b/tools/telemetry/telemetry/test_runner.py
@@ -14,7 +14,7 @@ import os
import sys
from telemetry import decorators
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import browser_finder
from telemetry.core import browser_options
from telemetry.core import command_line
@@ -109,7 +109,7 @@ class Run(command_line.OptparseCommand):
@classmethod
def AddCommandLineArgs(cls, parser):
- test.AddCommandLineArgs(parser)
+ benchmark.AddCommandLineArgs(parser)
# Allow tests to add their own command line options.
matching_tests = []
@@ -158,7 +158,7 @@ class Run(command_line.OptparseCommand):
discover.IsPageSetFile(page_set_path)):
parser.error('Unsupported page set file format.')
- class TestWrapper(test.Test):
+ class TestWrapper(benchmark.Benchmark):
test = test_class
@classmethod
@@ -170,9 +170,10 @@ class Run(command_line.OptparseCommand):
if len(args.positional_args) > 1:
parser.error('Too many arguments.')
- assert issubclass(test_class, test.Test), 'Trying to run a non-Test?!'
+ assert issubclass(test_class, benchmark.Benchmark), (
+ 'Trying to run a non-Benchmark?!')
- test.ProcessCommandLineArgs(parser, args)
+ benchmark.ProcessCommandLineArgs(parser, args)
test_class.ProcessCommandLineArgs(parser, args)
cls._test = test_class
@@ -202,7 +203,7 @@ def _MatchingCommands(string):
def _Tests():
tests = []
for base_dir in config.base_paths:
- tests += discover.DiscoverClasses(base_dir, base_dir, test.Test,
+ tests += discover.DiscoverClasses(base_dir, base_dir, benchmark.Benchmark,
index_by_class_name=True).values()
page_tests = discover.DiscoverClasses(base_dir, base_dir,
page_test.PageTest,
@@ -261,7 +262,7 @@ def _GetJsonTestList(possible_browser, test_classes, num_shards):
}
}
for test_class in test_classes:
- if not issubclass(test_class, test.Test):
+ if not issubclass(test_class, benchmark.Benchmark):
continue
if not decorators.IsEnabled(test_class, possible_browser):
continue
@@ -289,7 +290,7 @@ def _PrintTestList(tests):
format_string = ' %%-%ds %%s' % max(len(t.Name()) for t in tests)
filtered_tests = [test_class for test_class in tests
- if issubclass(test_class, test.Test)]
+ if issubclass(test_class, benchmark.Benchmark)]
if filtered_tests:
print >> sys.stderr, 'Available tests are:'
for test_class in sorted(filtered_tests, key=lambda t: t.Name()):
diff --git a/tools/telemetry/telemetry/util/find_dependencies.py b/tools/telemetry/telemetry/util/find_dependencies.py
index 3f2e7e4..398bc42 100644
--- a/tools/telemetry/telemetry/util/find_dependencies.py
+++ b/tools/telemetry/telemetry/util/find_dependencies.py
@@ -11,7 +11,7 @@ import os
import sys
import zipfile
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import command_line
from telemetry.core import discover
from telemetry.core import util
@@ -70,7 +70,7 @@ def FindPageSetDependencies(base_dir):
# Add base_dir to path so our imports relative to base_dir will work.
sys.path.append(base_dir)
- tests = discover.DiscoverClasses(base_dir, base_dir, test.Test,
+ tests = discover.DiscoverClasses(base_dir, base_dir, benchmark.Benchmark,
index_by_class_name=True)
for test_class in tests.itervalues():
diff --git a/tools/telemetry/telemetry/web_perf/timeline_based_measurement_unittest.py b/tools/telemetry/telemetry/web_perf/timeline_based_measurement_unittest.py
index 5893b8e..33fb0cf 100644
--- a/tools/telemetry/telemetry/web_perf/timeline_based_measurement_unittest.py
+++ b/tools/telemetry/telemetry/web_perf/timeline_based_measurement_unittest.py
@@ -5,7 +5,7 @@
import os
import unittest
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import wpr_modes
from telemetry.timeline import model as model_module
from telemetry.timeline import async_slice
@@ -121,7 +121,7 @@ class TimelineBasedMeasurementTest(
self._options.browser_options.wpr_mode = wpr_modes.WPR_OFF
# Disabled due to flakiness: crbug.com/368386
- @test.Disabled
+ @benchmark.Disabled
def testSmoothnessTimelineBasedMeasurementForSmoke(self):
ps = self.CreatePageSetFromFileInUnittestDataDir(
'interaction_enabled_page.html')
@@ -137,7 +137,7 @@ class TimelineBasedMeasurementTest(
self.assertEquals(len(v), 1)
# Disabled since mainthread_jank metric is not supported on windows platform.
- @test.Disabled('win')
+ @benchmark.Disabled('win')
def testMainthreadJankTimelineBasedMeasurement(self):
ps = self.CreateEmptyPageSet()
ps.AddPage(TestTimelinebasedMeasurementPage(ps, ps.base_dir))