Skip to content

Commit

Permalink
Default examples (#4)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Mattsson <[email protected]>
  • Loading branch information
datamattsson authored Jan 18, 2024
1 parent 29e3b52 commit 687798f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ Benk uses [FIO](https://github.com/axboe/fio) in client and server mode.

# Synopsis

Starter examples below. Build your own library of configuration files and reporting templates.
Starter examples below. Build your own library of configuration files and reporting templates. A walkthrough of some of these examples are available in a blog post on HPE Developer Community.

- [Working with Benk: A storage provisioning and IO performance benchmark suite for Kubernetes](https://developer.hpe.com/blog/working-with-benk-a-storage-provisioning-and-io-performance-benchmark-suite-for-kubernetes/)

## Hello World

Expand Down Expand Up @@ -44,7 +46,7 @@ Two helper shell scripts allows simple sequencing of multiple jobs and the repor
Assumes `kustomize/base/config.env` and `kustomize/base/storagclass.yaml` exists along with a `Namespace` named "benk" on the cluster.

```text
for i in `seq 8`; do cp -a kustomize/overlays/default kustomize/overlays/mytest-${i}; done
for i in {1..8}; do cp -a kustomize/overlays/default kustomize/overlays/mytest-${i}; done
# Edit kustomize/overlays/mytest-*/config.env for each iteration
./sequencer.sh mytest-
./src/benk/outputter.py -l logs/run-mytest-*.log -t jinja2/example-single.tsv.j2
Expand All @@ -55,8 +57,8 @@ for i in `seq 8`; do cp -a kustomize/overlays/default kustomize/overlays/mytest-
Assumes `kustomize/base/config.env` and `kustomize/base/storagclass.yaml` exists along with a `Namespace` named "benk" on the cluster.

```text
for i in `seq 8`; do cp -a kustomize/overlays/default kustomize/overlays/mytest-a-${i}; done
for i in `seq 8`; do cp -a kustomize/overlays/default kustomize/overlays/mytest-b-${i}; done
for i in {1..8}; do cp -a kustomize/overlays/default kustomize/overlays/mytest-a-${i}; done
for i in {1..8}; do cp -a kustomize/overlays/default kustomize/overlays/mytest-b-${i}; done
# Edit kustomize/overlays/mytest-*/config.env for each iteration
./sequencer.sh mytest-a-
./sequencer.sh mytest-b-
Expand Down
5 changes: 5 additions & 0 deletions jinja2/example-default-ab.md.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
| Threads | A (MB/s) | B (MB/s) | Diff |
| ------- | -------- | -------- | ---- |
{% for _ in a %}
| {{ "%-7s" | format(a[loop.index0].benk.metadata.parameters.config.workloadThreads) }} | {{ "%-8s" | format(((a[loop.index0].benk.fio.data.read.bw + a[loop.index0].benk.fio.data.write.bw) / 1024) | round | int) }} | {{ "%-8s" | format(((b[loop.index0].benk.fio.data.read.bw + b[loop.index0].benk.fio.data.write.bw) / 1024) | round | int) }} | {{ "%-3sx" | format((((b[loop.index0].benk.fio.data.read.bw + b[loop.index0].benk.fio.data.write.bw) / 1024) / ((a[loop.index0].benk.fio.data.read.bw + a[loop.index0].benk.fio.data.write.bw) / 1024)) | round(1)) }} |
{% endfor %}
12 changes: 12 additions & 0 deletions jinja2/example-default.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
report:
name: Example YAML template
logfile: {{ meta.log }}
jobs:
{% for run in log %}
- threads: {{ run.benk.fio.metadata.job.numjobs }}
runtime: {{ (run.benk.metadata.destruction.runtime + run.benk.metadata.provisioning.runtime) | round | int }}s
iops: {{ (run.benk.fio.data.read.iops + run.benk.fio.data.write.iops) | round | int }}
bandwidth: {{ ((run.benk.fio.data.read.bw + run.benk.fio.data.write.bw) / 1024) | round | int }}MB/s
bs: {{ run.benk.fio.metadata.job.bs }}
{% endfor %}

0 comments on commit 687798f

Please sign in to comment.