tree: 91332e5a5a9fc27eb0aeedd7b1be1fc2a3e6334f [path history] [tgz]
  1. benchmarks/
  2. chrome_telemetry_build/
  3. clear_system_cache/
  4. cli_tools/
  5. contrib/
  6. core/
  7. experimental/
  8. measurements/
  9. metrics/
  10. page_sets/
  11. testdata/
  12. .gitignore
  13. benchmark.csv
  14. bootstrap_deps
  15. BUILD.gn
  16. chrome-health-presets.yaml
  17. chrome-health-run-daily.sh
  18. chrome-health-run-weekly.sh
  19. cross_device_test_config.py
  20. crossbench
  21. diagnose_test_failure
  22. DIR_METADATA
  23. download_proto_trace.py
  24. expectations.config
  25. export_csv
  26. fetch_benchmark_deps.py
  27. fetch_benchmark_deps_unittest.py
  28. find_dependencies
  29. flakiness_cli
  30. generate_legacy_perf_dashboard_json.py
  31. generate_legacy_perf_dashboard_json_unittest.py
  32. generate_perf_data
  33. generate_perf_sharding.py
  34. list_affected_benchmarks
  35. list_benchmarks
  36. mac-m1-experiments.yaml
  37. OWNERS
  38. PRESUBMIT.py
  39. process_perf_results.py
  40. process_perf_results.pydeps
  41. process_perf_results_unittest.py
  42. pylintrc
  43. README.md
  44. record_wpr
  45. recording_benchmarks.md
  46. results_processor
  47. run_benchmark
  48. run_gtest_benchmark.py
  49. run_telemetry_tests
  50. run_tests
  51. scripts_smoke_unittest.py
  52. system_health_stories.csv
  53. update_wpr
  54. validate_perf_json_config
  55. validate_story_expectation_data
  56. validate_tbmv3_metric
  57. validate_wpr_archives
tools/perf/README.md

Chrome Benchmarking System

Overview

This directory contains benchmarks and infrastructure to test Chrome and Chromium and output performance measurements. These benchmarks are continuously run on the perf waterfall.

Also, see more information on how Chrome measures performance.

Using The Chrome Benchmarking System

Analyzing Results From The Perf Waterfall

The ChromePerf Dashboard is the destination for all metrics generated by the perf waterfall. It provides tools to set up a dashboard for performance of a set of tests + metrics over time. In addition, it provides the ability to launch a bisection by selecting a point on the dashboard.

Running A Single Test

The Chrome Benchmarking System has two methods for manually running performance tests: run_benchmark and Pinpoint.

run_benchmark is useful for creating and debugging benchmarks using local devices. Run from the command line, it has a number of flags useful for determining the internal state of the benchmark. For more information, see Run Benchmarks Locally.

Pinpoint wraps run_benchmark and provides the ability to remotely run A/B benchmarks using any platform available in our lab. It will run a benchmark for as many iterations as needed to get a statistically significant result, then visualize it.

If your're trying to debug a test or figure out how the infrastructure works, the easiest way is to set up the debugger in VSCode (guide here)] and set a breakpoint in /tools/perf/core/benchmark_runner.py.

Creating New Tests (stories)

The telemetry readme provides an overview of how tests are structured and some of the underlying technologies. After reading that doc, figure out if your story fits into an existing benchmark by checking here (or here for non-Googlers).

  • If it does, follow the instructions next to it. If there are no instructions, find the test type in src/tools/perf/page_sets.
  • Otherwise, read the Guideline for adding new benchmark.

After figuring out where your story fits, create a new one. There is a considerable amount of variation between different benchmarks, so use a nearby story as a model. You may also need to introduce custom JavaScript to drive interactions on the page or to deal with nondeterminsim. For an example, search this file for browse:tools:sheets:2019.

Next, we need to create a recording of all the content requested by the test. We then use this by serving it from a web server running on either the test device or a host device (for Android tests), removing one more source of nondeterminism. To do so, follow these instructions.

Tools In This Directory

This directory contains a variety of tools that can be used to run benchmarks, interact with speed services, and manage performance waterfall configurations. It also has commands for running functional unittests.

run_tests

This command allows you to run functional tests against the python code in this directory. For example, try:

./run_tests results_dashboard_unittest

Note that the positional argument can be any substring within the test name.

This may require you to set up your gsutil config first.

run_benchmark

This command allows running benchmarks defined in the chromium repository, specifically in tools/perf/benchmarks. If you need it, documentation is available on how to run benchmarks locally and how to properly set up your device.

update_wpr

A helper script to automate various tasks related to the update of Web Page Recordings for our benchmarks. In can help creating new recordings from live websites, replay those to make sure they work, upload them to cloud storage, and finally send a CL to review with the new recordings.

soundwave

Allows to fetch data from the Chrome Performance Dashboard and stores it locally on a SQLite database for further analysis and processing. It also allows defining studies, pre-sets of measurements a team is interested in tracking, and uploads them to cloud storage to visualize with the help of Looker Studio. This currently backs the v8 and health dashboards.