tree: 8e8abe9106d6f83b108ed25817f6851f0f152816 [path history] [tgz]
  1. backup/
  2. cockroachdb/
  3. configs/
  4. csv2days/
  5. demo/
  6. go/
  7. integration/
  8. jupyter/
  9. lint/
  10. migrations/
  11. modules/
  12. nanostat/
  13. pages/
  14. res/
  15. samplevariance/
  16. scripts/
  17. secrets/
  18. .eslintrc.js
  19. .gitignore
  20. API.md
  21. BACKUPS.md
  22. BUILD.bazel
  23. CHECKLIST.md
  24. COCKROACHDB.md
  25. create-ingestion-android-pubsub-topics.sh
  26. create-ingestion-android-x-pubsub-topics.sh
  27. create-ingestion-android-x2-pubsub-topics.sh
  28. create-ingestion-ct-pubsub-topics.sh
  29. create-ingestion-flutter-engine2-pubsub-topics.sh
  30. create-ingestion-flutter-flutter-pubsub-topics.sh
  31. create-ingestion-flutter-flutter2-pubsub-topics.sh
  32. create-ingestion-flutter-pubsub-topics.sh
  33. create-ingestion-pubsub-topics.sh
  34. demo.sh
  35. DESIGN.md
  36. FORMAT.md
  37. highlevel.excalidraw.png
  38. ingest.excalidraw.png
  39. Makefile
  40. migrate.sh
  41. PERFSERVER.md
  42. PERFTOOL.md
  43. PROD.md
  44. README.md
  45. reingest-android-data.sh
  46. run_with_spanner.sh
  47. Spanner.md
  48. TRIAGE.md
  49. tslint.json
perf/README.md

SkiaPerf Server

Reads Skia performance data from databases and serves interactive dashboards for easy exploration and annotations.

Developing

First check out this repo and get all the dependencies per this README.md, including the Cloud SDK, which is needed to run tests locally.

All building and testing is done by Bazel, but there is a Makefile that records regularly used commands.

Build

To build the full project:

bazelisk build --config=mayberemote //perf/...

Test

To run all the tests:

bazelisk test --config=mayberemote //perf/...

Note the first time you run this it will fail and inform you of the gcloud simulators that need to be running in the background and how to start them.

Running locally

To run a local instance of Perf against a fake dataset:

  1. Run with a fresh database (demo data ingested)

    make run-demo-instance
    
  2. Run without tearing down database (expects a running database on the machine)

    make run-demo-instance-db-persist
    

If you are interested in reading more about the local database, refer to this doc

You can also view demo/test pages of a web components by running demopage.sh from the root of the repo and passing in the relative path of the web component you want to view, for example:

./demopage.sh perf/modules/day-range-sk

Additionally, the remote backend can be reverse-proxied such that the demo page server will forward APIs under /_/ to the remote backend (ENV_REMOTE_ENDPOINT)

ENV_REMOTE_ENDPOINT='https://v8-perf.skia.org' ./demopage.sh perf/modules/day-range-sk

or

ENV_REMOTE_ENDPOINT='https://v8-perf.skia.org' bazelisk run //perf/modules/plot-summary-sk:demo_page_server

This will allow the demo page to fetch the real data.

Note you need to have entr installed for this to work:

sudo apt install entr

Legacy mode with CockroachDB (Deprecated)

In addition you will also need to install the full executable cockroach. In order to successfully install and work on the command, here are a set of cautions when installing coakroach on your machine:

  • Make sure to download the Full Binary version : https://www.cockroachlabs.com/docs/releases#v22-1. Choose the v22-1 full binary version for compatibility with Schema validation on your machine. Linux version is for cloudtop, and ARM 64-bit is for Mac.

    • After downloading the cockroach version, we extract the download archive anywhere(default is from Downloads), and then unzip the archive file to export that directory into the path variable.

    • Alternative, we can unzip the downloaded cockroach file, open the lib folder, and copy the libgeos.so and libgeos_c.so files from current path into the /usr/local/lib/cockroach folder, eg.

      cp -i /usr/local/google/home/username/Downloads/cockroach-v22.1.22.linux-amd64/lib/libgeos.so /usr/local/lib/cockroach
      
    • Then export path

      export PATH=$PATH:/path/to/cockroach
      
    • Then add this path into the .bashrc file. Also make sure to source the .bashrc file under the current path to refresh the active terminal, or open a new terminal.

    • After that, run

      cockroach start-single-node --insecure --listen-addr=127.0.0.1:26257
      

      (nit: listen-address is set by default)

    • Then type dt, you will see a list of local tables with no data.

    • To confirm that the cockroach installation has been completed, we should open a SQL shell to this running database, by running

      cockroach sql --insecure --host=localhost:26257