Setting Up Chrome Endure

It's easiest to follow the automated setup instructions listed below.  If you prefer to follow the original manual setup instructions, check them out here.

There is a python script that can be run to automatically set up Chrome Endure on your local machine.  The script is new and so far has only been tested on Linux.

Step 1: Download the scripts.
Create an empty directory and download and to the directory.  We will henceforth refer to that directory as <ENDURE_DIR>.

Step 2: Fetch Chrome Endure.
  > cd <ENDURE_DIR>
  > python

The above command will automatically setup Chrome Endure in the current working directory.  The script will fetch (1) depot_tools; (2) python code of Chrome Endure and its dependencies; and (3) pre-built chromium and pyauto binaries.

Step 3: Configure Google account credentials and custom URLs for Google services.
Provide Google account login credentials in configuration file <ENDURE_DIR>/src/chrome/test/functional/perf.cfg
The credentials will be used when your tests require logging into a Google account.
You can also customize URLs of Gmail/Docs/Plus/Account in this file, but this is optional.

Step 4: Run your first Chrome Endure test
  > cd <ENDURE_DIR>
        python <ENDURE_DIR>/src/chrome/test/functional/ \

The above command runs a Chrome Endure test for Gmail, which iteratively starts composing a message, then deletes it before sending.  Periodically, performance/memory statistics are sampled.  The test is a pyauto test named perf_endure.ChromeEndureGmailTest.testGmailComposeDiscard, and it is run just like any other pyauto test, with the exception that we also have to specify environment variables to the test. 

Environment variables:
  • TEST_LENGTH: controls the test length, in seconds
  • PERF_STATS_INTERVAL: controls the performance stats sampling rate, in seconds.  
  • LOCAL_PERF_DIR: to see local graphs, set this environment variable to the directory into which local graphing files are extracted. If you used to fetch Chrome Endure in Step 2,  the directory is <ENDURE_DIR>/chrome_graph.
Step 5: View resulting Chrome Endure graphs.
  > cd <ENDURE_DIR>
  > python

The above command will start a server which serves the directory of "chrome_graph" under the current working directory, which in our case, is <ENDURE_DIR>/chrome_graph. "--graph-dir" can be used to specify a different chrome graph location.

An available port will be automatically picked. Finally, visit http://localhost:<GIVEN_PORT> in your browser to see the Chrome Endure graphs.

You can run while the test is running. As each performance/memory sample is taken, the results are immediately outputted to <ENDURE_DIR>/chrome_graph, so you should be able to refresh your graph URL to see the most recent results, even though the test may still be running.
Subpages (1): Manual Setup