tree: 71ead1c62878c63114027edee530f6ebca7d61fb [path history] [tgz]
  1. features/
  2. ml/
  3. src/
  4. tests/
  5. .gitignore
  6. .style.yapf
  7. Dockerfile
  8. Dockerfile.testing
  12. tox.ini

Chromeperf Project Directory

This directory contains source code for all Python services for the Chromeperf project. This will include:

  • A port of the execution engine.
  • Migrated code for anomaly detection.

Code for existing services for the Chromeperf project are currently hosted in the catapult repository.


We‘re following standard open source Python package development and best practices. Specifically, we’re using the following packages and dependencies:

  • pytest: A test runner and testing framework which works well with the standard Python unittest framework.

  • tox: A testing automation tool which uses Python's standard venv package to manage testing environments.

One recommendation we're following is the separation of tests from the package code, which is why we have the src directory where all implementation modules are defined.


You should install virtualenv for Python3, and create a virtual environment to install local dependencies.

pip3 install --user virtualenv
python3 -m venv $HOME/chromeperf-venv

This will create the directory $HOME/chromeperf-venv where all the dependency packages will be installed. Once that's done you can activate the virtual environment setup using the activate script in $HOME/chromeperf-venv/bin:

source $HOME/chromeperf-venv/bin/activate

You can learn more about venv and how to use it at:

Part of the process involves installing all the requirements for developing the core libraries and services in this directory. We can do this by installing all the requirements from requirements.txt:

pip install -r requirements.txt


Following open source Python package best practices, we're developing the chromeperf core libraries as if it can be installed using pip. The tox package allows us to do that by automating the setup of temporary virtual environments for hermetic and reproducible testing:


You can learn more about tox at: