Skip to content

Commit

Permalink
runner.sh: transform boolean --log flag to string flag
Browse files Browse the repository at this point in the history
For MacOS NEOBENCH_LOGGER should be set to json-file as journald and
syslog are not supported by this architecture.

Close #159

Signed-off-by: Ekaterina Pavlova <[email protected]>
  • Loading branch information
AliceInHunterland committed Apr 27, 2024
1 parent aec270b commit 4ebbb49
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ The following default configurations are available:

```
-h, --help Show usage message.
-l, --log Container logging facility.
Example: -l journald -l syslog -l json-file
-d Benchmark description.
-m Benchmark mode.
Example: -m wrk -m rate
Expand Down Expand Up @@ -410,14 +412,16 @@ To add one more node configuration, provide all necessary information to the `no

Name|Description| Default |Example
---|---|---------|---
NEOBENCH_LOGGER|Container logging facility| `none` |`none`, `journald`, `syslog`
NEOBENCH_LOGGER|Container logging facility| `none` |`none`, `journald`, `syslog`,`json-file`
NEOBENCH_TC|Parameters passed to the `tc qdisc` (netem discipline) on container startup| |`delay 100ms`
NEOBENCH_TYPE|Type of the load| `NEO` |`NEO`, `GAS`
NEOBENCH_FROM_COUNT|Number of tx senders| `1` | `1`
NEOBENCH_TO_COUNT|Number of fund receivers| `1` | `1`
NEOBENCH_VALIDATOR_COUNT|Number of validators| `4` | `1`, `4`, `7`
NEOBENCH_VOTE|Vote for validators before the bench| empty |`1` or empty

For MacOS NEOBENCH_LOGGER should be set to `json-file` as `journald` and
`syslog` are not supported by this architecture.
## Benchmark results visualisation

There's a Python plotting script available for benchmark data visualisation.
Expand Down
20 changes: 18 additions & 2 deletions runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ show_help() {
echo " -t Request timeout."
echo " Used for RPC requests."
echo " Example: -t 30s"
echo " -l, --log Enable logging on consensus nodes."
echo " -l, --log Container logging facility. Default value is none"
echo " Example: -l journald -l syslog -l json-file"
echo " --tc Arguments to pass to 'tc qdisc netem' inside the container."
echo " Example: 'delay 100ms'"
exit 0
Expand All @@ -68,7 +69,22 @@ while test $# -gt 0; do

case $_opt in
-h | --help) show_help ;;
-l | --log) export NEOBENCH_LOGGER=journald ;;
-l | --log)
if [[ $# -gt 0 && ${1:0:1} != "-" ]]; then
case "$1" in
"syslog" | "journald" | "json-file" | "none")
export NEOBENCH_LOGGER="$1"
shift
;;
*)
fatal "unknown logger specified: $1"
;;
esac
else
export NEOBENCH_LOGGER="none"
fi
;;

--vote) export NEOBENCH_VOTE=1 ;;

-v | --validators)
Expand Down

0 comments on commit 4ebbb49

Please sign in to comment.