metrics: Generate PNGs alongside the PDF report

This PR generates the PNGs for the kata metrics PDF report.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
This commit is contained in:
Gabriela Cervantes 2023-08-29 16:50:32 +00:00
parent fce2487971
commit 878d1a2e7d

View File

@ -0,0 +1,19 @@
#!/bin/bash
# Copyright (c) 2018-2023 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
REPORTNAME="metrics_report.pdf"
cd scripts
Rscript --slave -e "library(knitr);knit('pdf.Rmd')"
Rscript --slave -e "library(knitr);pandoc('pdf.md', format='latex')"
Rscript --slave -e "library(knitr);knit('html.Rmd')"
Rscript --slave -e "library(knitr);pandoc('html.md', format='html')"
cp /scripts/pdf.pdf /outputdir/${REPORTNAME}
cp /scripts/figure/*.png /outputdir/
echo "PNGs of graphs and tables can be found in the output directory."
echo "The report, named ${REPORTNAME}, can be found in the output directory"