Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use gnuplot to plot benchmark results #70

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions local-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ For now, we use a static scenario in which we first develop the Hydra node:

## Benchmarks

The benchmark can be run using `cabal bench` and produces a `results.csv` file. To plot the transaction confirmation times you can use the `bench/plot.js` script.

Nodejs is provided by the `nix-shell`, but we need to install some dependencies with `npm install` (from within the `bench/` directory).
> TODO(SN): can we use nix/-shell to provide npm dependencies?)
The benchmark can be run using `cabal bench` and produces a `results.csv` file. To plot the transaction confirmation times you can use the `bench/plot.sh` script, passing it the directory containing the benchmark's results.

To run and plot results of the benchmark:
``` sh
Expand All @@ -28,6 +25,6 @@ Writing transactions to: /run/user/1000/bench-83d18973f95a554d/txs.json
[...]
Writing results to: /run/user/1000/bench-6b772589d08f82a5/results.csv
Benchmark bench-e2e: FINISH
$ node bench/plot.mjs /run/user/1000/bench-6b772589d08f82a5/results.csv
Created plot: /run/user/1000/bench-6b772589d08f82a5/results.svg
$ bench/plot.sh /run/user/1000/bench-6b772589d08f82a5/results.csv
Created plot: /run/user/1000/bench-6b772589d08f82a5/results.png
```
1 change: 0 additions & 1 deletion local-cluster/bench/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion local-cluster/bench/Bench/EndToEnd.hs
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,4 @@ writeResultsCsv fp res = do
where
headers = "txId,confirmationTime"

toCsv (a, b) = encode a <> "," <> encode b <> "\n"
toCsv (a, b) = show a <> "," <> encode b <> "\n"
Loading