mirror of
https://github.com/clearlinux/cloud-native-setup.git
synced 2026-09-03 04:11:38 +00:00
metrics: report: generate PNGs alongside the pdf
To aid in incorporating the results graphs and tables into other documents, generate PNG files of the tables and plots alongside the full PDF report, and place them in the output directory. Achieve this by processing an html as well as a pdf targetted output document, and grabbing the png's generated from that operation. Signed-off-by: Graham Whaley <graham.whaley@intel.com>
This commit is contained in:
committed by
David Lyle
parent
2d1f8551b0
commit
8787955188
@@ -7,8 +7,13 @@ REPORTNAME="metrics_report.pdf"
|
||||
|
||||
cd scripts
|
||||
|
||||
Rscript --slave -e "library(knitr);knit('metrics_report.Rmd')"
|
||||
Rscript --slave -e "library(knitr);pandoc('metrics_report.md', format='latex')"
|
||||
Rscript --slave -e "library(knitr);knit('pdf.Rmd')"
|
||||
Rscript --slave -e "library(knitr);pandoc('pdf.md', format='latex')"
|
||||
|
||||
cp /scripts/${REPORTNAME} /outputdir
|
||||
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"
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
# Copyright (c) 2018-2019 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
title: "Kubernetes metrics report"
|
||||
author: "Auto generated"
|
||||
date: "`r format(Sys.time(), '%d %B, %Y')`"
|
||||
output:
|
||||
html_document:
|
||||
urlcolor: blue
|
||||
---
|
||||
|
||||
```{r setup, include=FALSE}
|
||||
#Set these opts to get pdf images which fit into beamer slides better
|
||||
opts_chunk$set(dev = 'png')
|
||||
# Pick up any env set by the invoking script, such as the root dir of the
|
||||
# results data tree
|
||||
source("/inputdir/Env.R")
|
||||
```
|
||||
|
||||
```{r child = 'metrics_report.Rmd'}
|
||||
```
|
||||
@@ -3,21 +3,7 @@
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
title: "Kubernetes metrics report"
|
||||
author: "Auto generated"
|
||||
date: "`r format(Sys.time(), '%d %B, %Y')`"
|
||||
output:
|
||||
pdf_document:
|
||||
urlcolor: blue
|
||||
---
|
||||
|
||||
```{r setup, include=FALSE}
|
||||
#Set these opts to get pdf images which fit into beamer slides better
|
||||
opts_chunk$set(dev = 'pdf')
|
||||
# Pick up any env set by the invoking script, such as the root dir of the
|
||||
# results data tree
|
||||
source("/inputdir/Env.R")
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
# Introduction
|
||||
@@ -35,7 +21,7 @@ and more idle `busybox` pods on a single node Kubernetes cluster.
|
||||
|
||||
> Note: CPU % is measured as a system whole - 100% represents *all* CPUs on the node.
|
||||
|
||||
```{r, echo=FALSE, fig.cap="K8S scaling", results='asis'}
|
||||
```{r scaling, echo=FALSE, fig.cap="K8S scaling", results='asis'}
|
||||
source('tidy_scaling.R')
|
||||
```
|
||||
|
||||
@@ -46,7 +32,7 @@ This [test](https://github.com/clearlinux/cloud-native-setup/metrics/scaling/k8s
|
||||
measures the time taken to launch and delete pods in parallel using a deployment. The times
|
||||
are how long it takes for the whole deployment operation to complete.
|
||||
|
||||
```{r, echo=FALSE, fig.cap="K8S parallel pods"}
|
||||
```{r parallel, echo=FALSE, fig.cap="K8S parallel pods"}
|
||||
source('parallel.R')
|
||||
```
|
||||
|
||||
@@ -58,6 +44,6 @@ This table describes the test system details, as derived from the information co
|
||||
in the test results files.
|
||||
|
||||
|
||||
```{r, echo=FALSE, fig.cap="System configuration details"}
|
||||
```{r dut, echo=FALSE, fig.cap="System configuration details"}
|
||||
source('dut-details.R')
|
||||
```
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
# Copyright (c) 2018-2019 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
title: "Kubernetes metrics report"
|
||||
author: "Auto generated"
|
||||
date: "`r format(Sys.time(), '%d %B, %Y')`"
|
||||
output:
|
||||
pdf_document:
|
||||
urlcolor: blue
|
||||
---
|
||||
|
||||
```{r setup, include=FALSE}
|
||||
#Set these opts to get pdf images which fit into beamer slides better
|
||||
opts_chunk$set(dev = 'pdf')
|
||||
# Pick up any env set by the invoking script, such as the root dir of the
|
||||
# results data tree
|
||||
source("/inputdir/Env.R")
|
||||
```
|
||||
|
||||
```{r child = 'metrics_report.Rmd'}
|
||||
```
|
||||
Reference in New Issue
Block a user