Skip to content

Commit

Permalink
Add base_perftests on the performance waterfall
Browse files Browse the repository at this point in the history
Bug: 897751
Change-Id: I5e915e20b5c34438786622ce718279d908ee41c8
Reviewed-on: https://chromium-review.googlesource.com/c/1315212
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Ned Nguyen <nednguyen@google.com>
Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606554}
  • Loading branch information
skyostil authored and Commit Bot committed Nov 8, 2018
1 parent c677eac commit e301f61
Show file tree
Hide file tree
Showing 5 changed files with 227 additions and 0 deletions.
32 changes: 32 additions & 0 deletions base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,35 @@ under components/ instead.

Owners are added when a contributor has shown the above qualifications and
when they express interest. There isn't an upper bound on the number of OWNERS.

## Performance testing

Since the primitives provided by //base are used very widely, it is important to
ensure they scale to the necessary workloads and perform well under all
supported platforms. The `base_perftests` target is a suite of
synthetic microbenchmarks that measure performance in various scenarios:

* BasicPostTaskPerfTest: Exercises MessageLoopTaskRunner's multi-threaded
queue in isolation.
* ConditionVariablePerfTest: Measures thread switching cost of condition
variables.
* IntegratedPostTaskPerfTest: Exercises the full MessageLoop/RunLoop
machinery.
* JSONPerfTest: Tests JSONWriter and JSONReader performance.
* MessageLoopPerfTest: Measures the speed of task posting in various
configurations.
* ObserverListPerfTest: Exercises adding, removing and signalling observers.
* PthreadEventPerfTest: Establishes the baseline thread switching cost using
pthreads.
* ScheduleWorkTest: Measures the overhead of MessagePump::ScheduleWork.
* SequenceManagerPerfTest: Benchmarks SequenceManager scheduling with various
underlying task runners.
* TaskObserverPerfTest: Measures the incremental cost of adding task
observers.
* TaskPerfTest: Checks the cost of posting tasks between threads.
* WaitableEvent{Thread,}PerfTest: Measures waitable events in single and
multithreaded scenarios.

Regressions in these benchmarks can generally by caused by 1) operating system
changes, 2) compiler version or flag changes or 3) changes in //base code
itself.
158 changes: 158 additions & 0 deletions testing/buildbot/chromium.perf.json
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,47 @@
"script": "//testing/trigger_scripts/perf_device_trigger.py"
}
},
{
"args": [
"--gtest-benchmark-name",
"base_perftests",
"--non-telemetry=true",
"--migrated-test=true"
],
"isolate_name": "base_perftests",
"merge": {
"script": "//tools/perf/process_perf_results.py"
},
"name": "base_perftests",
"override_compile_targets": [
"base_perftests"
],
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"device_os": "MMB29Q",
"device_os_flavor": "google",
"device_type": "bullhead",
"os": "Android",
"pool": "chrome.tests.perf"
}
],
"expiration": 7200,
"hard_timeout": 25200,
"ignore_task_failure": false,
"io_timeout": 1800,
"shards": 1,
"upload_test_results": true
},
"trigger_script": {
"args": [
"--multiple-dimension-script-verbose",
"True"
],
"script": "//testing/trigger_scripts/perf_device_trigger.py"
}
},
{
"args": [
"--gtest-benchmark-name",
Expand Down Expand Up @@ -1032,6 +1073,45 @@
},
"linux-perf": {
"isolated_scripts": [
{
"args": [
"--gtest-benchmark-name",
"base_perftests",
"--non-telemetry=true",
"--migrated-test=true"
],
"isolate_name": "base_perftests",
"merge": {
"script": "//tools/perf/process_perf_results.py"
},
"name": "base_perftests",
"override_compile_targets": [
"base_perftests"
],
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"gpu": "10de:1cb3",
"os": "Ubuntu-14.04",
"pool": "chrome.tests.perf"
}
],
"expiration": 7200,
"hard_timeout": 25200,
"ignore_task_failure": false,
"io_timeout": 1800,
"shards": 1,
"upload_test_results": true
},
"trigger_script": {
"args": [
"--multiple-dimension-script-verbose",
"True"
],
"script": "//testing/trigger_scripts/perf_device_trigger.py"
}
},
{
"args": [
"--gtest-benchmark-name",
Expand Down Expand Up @@ -1356,6 +1436,45 @@
},
"mac-10_13_laptop_high_end-perf": {
"isolated_scripts": [
{
"args": [
"--gtest-benchmark-name",
"base_perftests",
"--non-telemetry=true",
"--migrated-test=true"
],
"isolate_name": "base_perftests",
"merge": {
"script": "//tools/perf/process_perf_results.py"
},
"name": "base_perftests",
"override_compile_targets": [
"base_perftests"
],
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"gpu": "1002:6821",
"os": "Mac-10.13",
"pool": "chrome.tests.perf"
}
],
"expiration": 7200,
"hard_timeout": 25200,
"ignore_task_failure": false,
"io_timeout": 1800,
"shards": 1,
"upload_test_results": true
},
"trigger_script": {
"args": [
"--multiple-dimension-script-verbose",
"True"
],
"script": "//testing/trigger_scripts/perf_device_trigger.py"
}
},
{
"args": [
"--gtest-benchmark-name",
Expand Down Expand Up @@ -1523,6 +1642,45 @@
},
"win-10-perf": {
"isolated_scripts": [
{
"args": [
"--gtest-benchmark-name",
"base_perftests",
"--non-telemetry=true",
"--migrated-test=true"
],
"isolate_name": "base_perftests",
"merge": {
"script": "//tools/perf/process_perf_results.py"
},
"name": "base_perftests",
"override_compile_targets": [
"base_perftests"
],
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"gpu": "8086:5912",
"os": "Windows-10",
"pool": "chrome.tests.perf"
}
],
"expiration": 7200,
"hard_timeout": 25200,
"ignore_task_failure": false,
"io_timeout": 1800,
"shards": 1,
"upload_test_results": true
},
"trigger_script": {
"args": [
"--multiple-dimension-script-verbose",
"True"
],
"script": "//testing/trigger_scripts/perf_device_trigger.py"
}
},
{
"args": [
"--gtest-benchmark-name",
Expand Down
11 changes: 11 additions & 0 deletions testing/buildbot/gn_isolate_map.pyl
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,17 @@
"label": "//base:base_unittests",
"type": "console_test_launcher",
},
"base_perftests": {
"label": "//base:base_perftests",
"type": "script",
"script": "//testing/scripts/run_performance_tests_wrapper.py",
"args": [
"base_perftests",
"--test-launcher-print-test-stdio=always",
"--test-launcher-jobs=1",
"--test-launcher-retry-limit=0",
],
},
"blink_common_unittests": {
"label": "//third_party/blink/common:blink_common_unittests",
"type": "console_test_launcher",
Expand Down
1 change: 1 addition & 0 deletions tools/perf/benchmark.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ AUTOGENERATED FILE DO NOT EDIT
See https://bit.ly/update-benchmarks-info to make changes
Benchmark name,Individual owners,Component,Documentation,Tags
angle_perftests,"jmadill@chromium.org, chrome-gpu-perf-owners@chromium.org",Internals>GPU>ANGLE,,
base_perftests,"skyostil@chromium.org, gab@chromium.org",Internals>SequenceManager,https://chromium.googlesource.com/chromium/src/+/HEAD/base/README.md#performance-testing,
blink_perf.accessibility,dmazzoni@chromium.org,Blink>Accessibility,https://bit.ly/blink-perf-benchmarks,
blink_perf.bindings,"jbroman@chromium.org, yukishiino@chromium.org, haraken@chromium.org",Blink>Bindings,https://bit.ly/blink-perf-benchmarks,
blink_perf.canvas,fserb@chromium.org,Blink>Canvas,https://bit.ly/blink-perf-benchmarks,
Expand Down
25 changes: 25 additions & 0 deletions tools/perf/core/perf_data_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@
'extra_args': [
'--shard-timeout=300'
],
},
{
'isolate': 'base_perftests',
'num_shards': 1,
'telemetry': False,
}
],
'platform': 'android',
Expand Down Expand Up @@ -338,6 +343,11 @@
'isolate': 'views_perftests',
'num_shards': 1,
'telemetry': False,
},
{
'isolate': 'base_perftests',
'num_shards': 1,
'telemetry': False,
}
],
'platform': 'win',
Expand Down Expand Up @@ -500,6 +510,11 @@
'isolate': 'media_perftests',
'num_shards': 1,
'telemetry': False,
},
{
'isolate': 'base_perftests',
'num_shards': 1,
'telemetry': False,
}
],
'platform': 'linux',
Expand Down Expand Up @@ -534,6 +549,11 @@
'isolate': 'media_perftests',
'num_shards': 1,
'telemetry': False,
},
{
'isolate': 'base_perftests',
'num_shards': 1,
'telemetry': False,
}
],
'platform': 'mac',
Expand Down Expand Up @@ -616,6 +636,11 @@ def __init__(self, emails, component='', documentation_url='', tags='',
'angle_perftests': BenchmarkMetadata(
'jmadill@chromium.org, chrome-gpu-perf-owners@chromium.org',
'Internals>GPU>ANGLE'),
'base_perftests': BenchmarkMetadata(
'skyostil@chromium.org, gab@chromium.org',
'Internals>SequenceManager',
('https://chromium.googlesource.com/chromium/src/+/HEAD/base/' +
'README.md#performance-testing')),
'validating_command_buffer_perftests': BenchmarkMetadata(
'piman@chromium.org, chrome-gpu-perf-owners@chromium.org',
'Internals>GPU'),
Expand Down

0 comments on commit e301f61

Please sign in to comment.