This document lists the steps and commands that were executed to set up chart generation.
The following commands are all that is needed to run the benchmark tests and generate the charts (SVG).
All intermediate files and results are written to ..build/benchmark/.
The final results will be copied into this folder.
npm ci # install all dependencies.
npm run build # generate the chartsHere is a summary of the most important scripts listed in the package.json file:
- build: Executes all scripts that are needed to create the charts. Same as
create-benchmark-charts. - convert-xml-to-json: Converts the benchmark results XML to JSON using convert-xml-to-json.
- generate-svg-chart: Generates a bar chart from the benchmark results and stores it as a SVG vector graphics file using vega-lite.
- copy-all: Copies all results from the working directory
..build/benchmark/to the corresponding directories in this folder.
Here are some more commands that were used to setup chart generation for this project.
The following commands were used to install vega command line utilities in the root repository path. Since it depends on node-canvas the node-canvas installation might be needed in advance.
brew install pkg-config cairo pango librsvg pixman
npm install --save-dev canvas vega-cliIn root repository path execute:
npm install --save-dev vega-liteThe following command uses NPM convert-xml-to-json to convert a XML to a JSON file:
npx --yes convert-xml-to-json ../build/test/test-xml-report.xml test-xml-report.jsonThe following command generates the SVG chart as described in Compiling Vega-Lite to Vega using npx:
npx -p vega -p vega-lite vl2svg --loglevel info BenchmarkChartHorizontal.json BenchmarkChart.svg