diff options
author | dtu@chromium.org <dtu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-19 20:36:18 +0000 |
---|---|---|
committer | dtu@chromium.org <dtu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-19 20:36:18 +0000 |
commit | 8e031cd625904680f9c9113cac159385b52c0612 (patch) | |
tree | f214dbbda03bb8ab2df89e0a52918c4d3412d663 | |
parent | 9c813dad1bb091fb122b8c81f61432fc3c9978c5 (diff) | |
download | chromium_src-8e031cd625904680f9c9113cac159385b52c0612.zip chromium_src-8e031cd625904680f9c9113cac159385b52c0612.tar.gz chromium_src-8e031cd625904680f9c9113cac159385b52c0612.tar.bz2 |
[telemetry] Add run_benchmark benchmarks for everything that runs on the bots.
BUG=237412
TEST=None.
R=tonyg@chromium.org
Review URL: https://codereview.chromium.org/19721002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212642 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | tools/perf/benchmarks/blink_perf.py | 19 | ||||
-rw-r--r-- | tools/perf/benchmarks/dromaeo.py | 76 | ||||
-rw-r--r-- | tools/perf/benchmarks/image_decoding.py | 12 | ||||
-rw-r--r-- | tools/perf/benchmarks/memory.py | 16 | ||||
-rw-r--r-- | tools/perf/benchmarks/netsim_top25.py | 23 | ||||
-rw-r--r-- | tools/perf/benchmarks/page_cycler.py | 91 | ||||
-rw-r--r-- | tools/perf/benchmarks/robohornet_pro.py (renamed from tools/perf/benchmarks/robohornetpro.py) | 0 | ||||
-rw-r--r-- | tools/perf/benchmarks/startup_warm.py | 11 | ||||
-rw-r--r-- | tools/perf/measurements/blink_perf.py | 78 | ||||
-rw-r--r-- | tools/perf/measurements/page_cycler.py | 1 |
10 files changed, 268 insertions, 59 deletions
diff --git a/tools/perf/benchmarks/blink_perf.py b/tools/perf/benchmarks/blink_perf.py new file mode 100644 index 0000000..a8a4ecd --- /dev/null +++ b/tools/perf/benchmarks/blink_perf.py @@ -0,0 +1,19 @@ +# Copyright (c) 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. + +import os + +from telemetry import test +from telemetry.core import util + +from measurements import blink_perf + + +class BlinkPerfAll(test.Test): + test = blink_perf.BlinkPerf + + def CreatePageSet(self, options): + path = os.path.join( + util.GetChromiumSrcDir(), 'third_party', 'WebKit', 'PerformanceTests') + return blink_perf.CreatePageSetFromPath(path) diff --git a/tools/perf/benchmarks/dromaeo.py b/tools/perf/benchmarks/dromaeo.py new file mode 100644 index 0000000..ed181cd --- /dev/null +++ b/tools/perf/benchmarks/dromaeo.py @@ -0,0 +1,76 @@ +# Copyright (c) 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 measurements import dromaeo + + +class DromaeoDomCoreAttr(test.Test): + test = dromaeo.Dromaeo + page_set = 'page_sets/dromaeo/domcoreattr.json' + + +class DromaeoDomCoreModify(test.Test): + test = dromaeo.Dromaeo + page_set = 'page_sets/dromaeo/domcoremodify.json' + + +class DromaeoDomCoreQuery(test.Test): + test = dromaeo.Dromaeo + page_set = 'page_sets/dromaeo/domcorequery.json' + + +class DromaeoDomCoreTraverse(test.Test): + test = dromaeo.Dromaeo + page_set = 'page_sets/dromaeo/domcoretraverse.json' + + +class DromaeoJslibAttrJquery(test.Test): + test = dromaeo.Dromaeo + page_set = 'page_sets/dromaeo/jslibattrjquery.json' + + +class DromaeoJslibAttrPrototype(test.Test): + test = dromaeo.Dromaeo + page_set = 'page_sets/dromaeo/jslibattrprototype.json' + + +class DromaeoJslibEventJquery(test.Test): + test = dromaeo.Dromaeo + page_set = 'page_sets/dromaeo/jslibeventjquery.json' + + +class DromaeoJslibEventPrototype(test.Test): + test = dromaeo.Dromaeo + page_set = 'page_sets/dromaeo/jslibeventprototype.json' + + +class DromaeoJslibModifyJquery(test.Test): + test = dromaeo.Dromaeo + page_set = 'page_sets/dromaeo/jslibmodifyjquery.json' + + +class DromaeoJslibModifyPrototype(test.Test): + test = dromaeo.Dromaeo + page_set = 'page_sets/dromaeo/jslibmodifyprototype.json' + + +class DromaeoJslibStyleJquery(test.Test): + test = dromaeo.Dromaeo + page_set = 'page_sets/dromaeo/jslibstylejquery.json' + + +class DromaeoJslibStylePrototype(test.Test): + test = dromaeo.Dromaeo + page_set = 'page_sets/dromaeo/jslibstyleprototype.json' + + +class DromaeoJslibTraverseJquery(test.Test): + test = dromaeo.Dromaeo + page_set = 'page_sets/dromaeo/jslibtraversejquery.json' + + +class DromaeoJslibTraversePrototype(test.Test): + test = dromaeo.Dromaeo + page_set = 'page_sets/dromaeo/jslibtraverseprototype.json' diff --git a/tools/perf/benchmarks/image_decoding.py b/tools/perf/benchmarks/image_decoding.py new file mode 100644 index 0000000..4b4f9fe --- /dev/null +++ b/tools/perf/benchmarks/image_decoding.py @@ -0,0 +1,12 @@ +# Copyright (c) 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 measurements import image_decoding + + +class ImageDecodingToughImageCases(test.Test): + test = image_decoding.ImageDecoding + # TODO: Rename this page set to tough_image_cases.json + page_set = 'page_sets/image_decoding_measurement.json' diff --git a/tools/perf/benchmarks/memory.py b/tools/perf/benchmarks/memory.py new file mode 100644 index 0000000..6837b59 --- /dev/null +++ b/tools/perf/benchmarks/memory.py @@ -0,0 +1,16 @@ +# Copyright (c) 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 measurements import memory + + +class Memory(test.Test): + test = memory.Memory + page_set = 'page_sets/top_25.json' + + +class Reload(test.Test): + test = memory.Memory + page_set = 'page_sets/2012Q3.json' diff --git a/tools/perf/benchmarks/netsim_top25.py b/tools/perf/benchmarks/netsim_top25.py deleted file mode 100644 index f6461e4..0000000 --- a/tools/perf/benchmarks/netsim_top25.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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 measurements import page_cycler - - -class NetsimTop25(test.Test): - """Measures load time of the top 25 sites under simulated cable network.""" - test = page_cycler.PageCycler - page_set = 'tools/perf/page_sets/top_25.json' - options = { - 'extra_wpr_args': [ - '--shaping_type=proxy', - '--net=cable' - ], - 'pageset_repeat': '5', - } - - def __init__(self): - super(NetsimTop25, self).__init__() - self.test.clear_cache_before_each_run = True diff --git a/tools/perf/benchmarks/page_cycler.py b/tools/perf/benchmarks/page_cycler.py new file mode 100644 index 0000000..c82f880 --- /dev/null +++ b/tools/perf/benchmarks/page_cycler.py @@ -0,0 +1,91 @@ +# Copyright (c) 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 measurements import page_cycler + + +class PageCyclerBloat(test.Test): + test = page_cycler.PageCycler + page_set = 'page_sets/page_cycler/bloat.json' + options = {'pageset_repeat': 10} + + +class PageCyclerDhtml(test.Test): + test = page_cycler.PageCycler + page_set = 'page_sets/page_cycler/dhtml.json' + options = {'pageset_repeat': 10} + + +class PageCyclerIndexeddb(test.Test): + test = page_cycler.PageCycler + page_set = 'page_sets/page_cycler/indexed_db/basic_insert.json' + options = {'pageset_repeat': 10} + + +class PageCyclerIntlArFaHe(test.Test): + test = page_cycler.PageCycler + page_set = 'page_sets/intl_ar_fa_he.json' + options = {'pageset_repeat': 10} + + +class PageCyclerIntlEsFrPtBr(test.Test): + test = page_cycler.PageCycler + page_set = 'page_sets/intel_es_fr_pt-BR.json' + options = {'pageset_repeat': 10} + + +class PageCyclerIntlHiRu(test.Test): + test = page_cycler.PageCycler + page_set = 'page_sets/intl_hi_ru.json' + options = {'pageset_repeat': 10} + + +class PageCyclerIntlJaZh(test.Test): + test = page_cycler.PageCycler + page_set = 'page_sets/intl_ja_zh.json' + options = {'pageset_repeat': 10} + + +class PageCyclerIntlKoThVi(test.Test): + test = page_cycler.PageCycler + page_set = 'page_sets/intl_ko_th_vi.json' + options = {'pageset_repeat': 10} + + +class PageCyclerMorejs(test.Test): + test = page_cycler.PageCycler + page_set = 'page_sets/morejs.json' + options = {'pageset_repeat': 10} + + +class PageCyclerMoz(test.Test): + test = page_cycler.PageCycler + page_set = 'page_sets/page_cycler/moz.json' + options = {'pageset_repeat': 10} + + +class PageCyclerNetsimTop25(test.Test): + """Measures load time of the top 25 sites under simulated cable network.""" + test = page_cycler.PageCycler + page_set = 'tools/perf/page_sets/top_25.json' + options = { + 'extra_wpr_args': [ + '--shaping_type=proxy', + '--net=cable' + ], + 'pageset_repeat': '5', + } + + def __init__(self): + super(PageCyclerNetsimTop25, self).__init__() + # TODO: This isn't quite right. + # This option will still apply to page cyclers that run after this one. + self.test.clear_cache_before_each_run = True + + +class PageCyclerTypical25(test.Test): + test = page_cycler.PageCycler + page_set = 'page_sets/typical_25.json' + options = {'pageset_repeat': 10} diff --git a/tools/perf/benchmarks/robohornetpro.py b/tools/perf/benchmarks/robohornet_pro.py index 090d9c8..090d9c8 100644 --- a/tools/perf/benchmarks/robohornetpro.py +++ b/tools/perf/benchmarks/robohornet_pro.py diff --git a/tools/perf/benchmarks/startup_warm.py b/tools/perf/benchmarks/startup_warm.py new file mode 100644 index 0000000..b132052 --- /dev/null +++ b/tools/perf/benchmarks/startup_warm.py @@ -0,0 +1,11 @@ +# Copyright (c) 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 measurements import startup_warm + + +class StartupWarmBlankPage(test.Test): + test = startup_warm.StartupWarm + page_set = 'page_sets/blank_page.json' diff --git a/tools/perf/measurements/blink_perf.py b/tools/perf/measurements/blink_perf.py index 6ad4c1d..c9c5af9 100644 --- a/tools/perf/measurements/blink_perf.py +++ b/tools/perf/measurements/blink_perf.py @@ -12,6 +12,47 @@ from telemetry.page import page_measurement from telemetry.page import page_set +def CreatePageSetFromPath(path): + assert os.path.exists(path) + + page_set_dict = {'pages': []} + + def _AddPage(path): + if not path.endswith('.html'): + return + if '../' in open(path, 'r').read(): + # If the page looks like it references its parent dir, include it. + page_set_dict['serving_dirs'] = [os.path.dirname(os.path.dirname(path))] + page_set_dict['pages'].append({'url': + 'file://' + path.replace('\\', '/')}) + + def _AddDir(dir_path, skipped): + for path in os.listdir(dir_path): + if path == 'resources': + continue + path = os.path.join(dir_path, path) + if path.startswith(tuple([os.path.join(path, s) + for s in skipped])): + continue + if os.path.isdir(path): + _AddDir(path, skipped) + else: + _AddPage(path) + + if os.path.isdir(path): + skipped = [] + skipped_file = os.path.join(path, 'Skipped') + if os.path.exists(skipped_file): + for line in open(skipped_file, 'r').readlines(): + line = line.strip() + if line and not line.startswith('#'): + skipped.append(line.replace('/', os.sep)) + _AddDir(path, skipped) + else: + _AddPage(path) + return page_set.PageSet.FromDict(page_set_dict, os.getcwd() + os.sep) + + class BlinkPerf(page_measurement.PageMeasurement): def __init__(self): super(BlinkPerf, self).__init__('') @@ -30,42 +71,7 @@ class BlinkPerf(page_measurement.PageMeasurement): print '%s does not exist.' % page_set_arg sys.exit(1) - page_set_dict = {'pages': []} - - def _AddPage(path): - if not path.endswith('.html'): - return - if '../' in open(path, 'r').read(): - # If the page looks like it references its parent dir, include it. - page_set_dict['serving_dirs'] = [os.path.dirname(os.path.dirname(path))] - page_set_dict['pages'].append({'url': - 'file://' + path.replace('\\', '/')}) - - def _AddDir(dir_path, skipped): - for path in os.listdir(dir_path): - if path == 'resources': - continue - path = os.path.join(dir_path, path) - if path.startswith(tuple([os.path.join(page_set_arg, s) - for s in skipped])): - continue - if os.path.isdir(path): - _AddDir(path, skipped) - else: - _AddPage(path) - - if os.path.isdir(page_set_arg): - skipped = [] - skipped_file = os.path.join(page_set_arg, 'Skipped') - if os.path.exists(skipped_file): - for line in open(skipped_file, 'r').readlines(): - line = line.strip() - if line and not line.startswith('#'): - skipped.append(line.replace('/', os.sep)) - _AddDir(page_set_arg, skipped) - else: - _AddPage(page_set_arg) - return page_set.PageSet.FromDict(page_set_dict, os.getcwd() + os.sep) + return CreatePageSetFromPath(page_set_arg) @property def results_are_the_same_on_every_page(self): diff --git a/tools/perf/measurements/page_cycler.py b/tools/perf/measurements/page_cycler.py index 9c9cf83..811d87d 100644 --- a/tools/perf/measurements/page_cycler.py +++ b/tools/perf/measurements/page_cycler.py @@ -44,6 +44,7 @@ class PageCycler(page_measurement.PageMeasurement): def AddCommandLineOptions(self, parser): # The page cyclers should default to 10 iterations. In order to change the # default of an option, we must remove and re-add it. + # TODO: Remove this after transition to run_benchmark. pageset_repeat_option = parser.get_option('--pageset-repeat') pageset_repeat_option.default = 10 parser.remove_option('--pageset-repeat') |