Skip to content

Add script to run benchmark and submit metrics

Shinigami requested to merge aryacollection.hsp/librsvg:benchmark-script into main

The script runs cachegrind on the given command and arguments. It parses the cachegrind output file and submit metrics to the librsvg-metrics webapp.

To run the script, execute:

./benchmark.py path/to/rsvg-bench --args-to-rsvg-bench path/to/svg/files

The documentation of the script is pending but here are a few important details. There are 3 environment variables that the script expects: CI_COMMIT_SHA, CI_COMMIT_TIMESTAMP and METRICS_TOKEN. The first two are optional and the script falls back to finding that data using git cli in absence of the env vars. The last one is compulsory and the api token needed to submit metrics to librsvg webapp. The script also checks whether the working tree is clean or not before executing the benchmarks as a sanity check.

The script also needs one external dependency to run, python requests module. It can be installed using pip install requests.

Edited by Shinigami

Merge request reports