summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-01-16 12:42:07 +0200
committerLars Wirzenius <liw@liw.fi>2022-01-16 12:42:07 +0200
commitd9efc89cc3f12978966b3b64957dc365f60b32a8 (patch)
tree85632ac9cb4dbac356fc19c235c814ea03e679cd
parent9c93adbb411274c05ac4e3c4cfbbcc9ff112a0b4 (diff)
downloadobnam-benchmark-results-d9efc89cc3f12978966b3b64957dc365f60b32a8.tar.gz
feat: add script to produce HTML report from result files
Sponsored-by: author
-rw-r--r--README.md (renamed from README.me)0
-rw-r--r--report.css61
-rwxr-xr-xreport.sh7
3 files changed, 68 insertions, 0 deletions
diff --git a/README.me b/README.md
index 7e12f08..7e12f08 100644
--- a/README.me
+++ b/README.md
diff --git a/report.css b/report.css
new file mode 100644
index 0000000..76735fd
--- /dev/null
+++ b/report.css
@@ -0,0 +1,61 @@
+<style>
+html {
+ background: white;
+ font-family: serif;
+ margin-left: 0em;
+ margin-right: 0em;
+ margin-top: 1em;
+}
+
+body {
+ font-family: sans-serif;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ font-weight: bold;
+ margin-top: 2em;
+}
+
+h1 {
+ font-size: 150%;
+}
+
+h2 {
+ font-size: 120%;
+}
+
+h3 {
+ font-size: 100%;
+}
+
+ul li, ol li {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+table {
+ border: 1px solid black;
+ margin-top: 3em;
+ width: 100%;
+}
+
+caption {
+ font-weight: bold;
+}
+
+th {
+ font-weight: bold;
+}
+
+tr.odd {
+ background-color: #f2f2f2;
+}
+
+th, td {
+ text-align: right;
+}
+
+td {
+ font-family: monospace;
+}
+</style>
diff --git a/report.sh b/report.sh
new file mode 100755
index 0000000..02935d8
--- /dev/null
+++ b/report.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -euo pipefail
+
+TITLE="Obnam benchmarks"
+obnam-benchmark report "$@" |
+ pandoc - -o obnam-benchmark.html --standalone -H report.css --toc --metadata title="$TITLE"