View on GitHub
File Changes
-
pgpass
+
configuration/pgpass
logs/
db/
db-0/
db-1/
db-2/
-
socket/
configuration/[0-9a-z][0-9a-z][0-9a-z][0-9a-z][0-9a-z]/
+
## run the benchmark using 'stack'

                      
-
## preparation
+
RUNNER="stack --nix exec" ./start.sh
+

                      
+

                      
+
## preparation for the explorer

                      
### database

                      
make sure this user exists in the database you are connecting to, and it has the right to create new databases.
(created using a `CREATE USER` command)

                      
-

                      

                      
# process
create_new_genesis=1
-
clean_explorer_db=1
+
clean_explorer_db=0
run_cluster_nodes=1
-
run_explorer=1
+
run_explorer=0
run_tx_generator=1

                      

                      
fi

                      

                      
-
# wait for transactions
-
tmux select-window -t :0
-
tmux new-window -n Analysis "\
-
  echo 'waiting for transactions...'\
-
  sleep 30\
-
  echo 'analyse data'\
-
  echo 'TPS - transactions per second'\
-
  echo 'TBPS - transaction bytes per second'\
-
  echo 'number of slots total'\
-
  echo 'number of slots per node'\
-
  echo 'number of missed slots'\
-
  echo 'distribution of block size in transactions'\
-
  echo 'distribution of block size in bytes'\
-
  echo 'distribution of seconds between blocks' \
-
  $SHELL"
+
tmux select-window -n Nodes
sleep 1
tmux set-window-option remain-on-exit on
-

                      
+
$SHELL
\ No newline at end of file
# here we set up outputs of logging in 'katip':
setupScribes:
  - scKind: FileSK
-
    scName: "logs/node-0.log"
+
    scName: "logs/node-0.json"
    scFormat: ScJson

                      
# if not indicated otherwise, then log output is directed to this:
defaultScribes:
  - - FileSK
-
    - "logs/node-0.log"
+
    - "logs/node-0.json"

                      
# more options which can be passed as key-value pairs:
options:
# here we set up outputs of logging in 'katip':
setupScribes:
  - scKind: FileSK
-
    scName: "logs/node-1.log"
+
    scName: "logs/node-1.json"
    scFormat: ScJson

                      
# if not indicated otherwise, then log output is directed to this:
defaultScribes:
  - - FileSK
-
    - "logs/node-1.log"
+
    - "logs/node-1.json"

                      
# more options which can be passed as key-value pairs:
options:
# here we set up outputs of logging in 'katip':
setupScribes:
  - scKind: FileSK
-
    scName: "logs/node-2.log"
+
    scName: "logs/node-2.json"
    scFormat: ScJson

                      
# if not indicated otherwise, then log output is directed to this:
defaultScribes:
  - - FileSK
-
    - "logs/node-2.log"
+
    - "logs/node-2.json"

                      
# more options which can be passed as key-value pairs:
options:
# here we set up outputs of logging in 'katip':
setupScribes:
  - scKind: FileSK
-
    scName: "logs/generator.log"
+
    scName: "logs/generator.json"
    scFormat: ScJson
  - scKind: StdoutSK
    scName: stdout
# if not indicated otherwise, then log output is directed to this:
defaultScribes:
  - - FileSK
-
    - "logs/generator.log"
+
    - "logs/generator.json"
  - - StdoutSK
    - stdout

                      
)

                      
set -xe
-
RUNNER=${RUNNER:-cabal v2-run -v0 --}
+
RUNNER=${RUNNER:-cabal v2-run -v0}
+
CMD="${RUNNER} cardano-cli --"

                      
-
${RUNNER} cardano-cli genesis "${args[@]}" "[email protected]"
+
${CMD} genesis "${args[@]}" "[email protected]"

                      
# move new genesis to configuration
-
GENHASH=`${RUNNER} cardano-cli "${common[@]}" print-genesis-hash --genesis-json "${tmpdir}/genesis.json" | tail -1`
+
GENHASH=`${CMD} "${common[@]}" print-genesis-hash --genesis-json "${tmpdir}/genesis.json" | tail -1`
TARGETDIR="${CONFIGDIR}/${GENHASH:0:5}"
mkdir -vp "${TARGETDIR}"
cp -iav ${tmpdir}/genesis.json ${TARGETDIR}/
  exit 1
fi

                      
-
CMD="cabal v2-run --"
+
RUNNER=${RUNNER:-cabal v2-run -v0}
+
CMD="${RUNNER} cardano-node --"

                      
# VERBOSITY="--tracing-verbosity-minimal"
# VERBOSITY="--tracing-verbosity-normal"

                      
# start nodes
tmux select-pane -t 0
-
tmux send-keys "cd '${BASEPATH}'; ${CMD} exe:cardano-node run $(nodeargs 0 "$(echo -n ${EXTRA})") " C-m
+
tmux send-keys "cd '${BASEPATH}'; ${CMD} run $(nodeargs 0 "$(echo -n ${EXTRA})") " C-m
tmux select-pane -t 1
-
tmux send-keys "cd '${BASEPATH}'; ${CMD} exe:cardano-node run $(nodeargs 1 "$(echo -n ${EXTRA})") " C-m
+
tmux send-keys "cd '${BASEPATH}'; ${CMD} run $(nodeargs 1 "$(echo -n ${EXTRA})") " C-m
tmux select-pane -t 2
-
tmux send-keys "cd '${BASEPATH}'; ${CMD} exe:cardano-node run $(nodeargs 2 "$(echo -n ${EXTRA})") " C-m
+
tmux send-keys "cd '${BASEPATH}'; ${CMD} run $(nodeargs 2 "$(echo -n ${EXTRA})") " C-m

                      
cd cardano-explorer.git

                      
-
EXPLORER="cabal v2-run exe:cardano-explorer-node -- "
+
RUNNER=${RUNNER:-cabal v2-run -v0}
+
EXPLORER="${RUNNER} cardano-explorer-node --"
+

                      
exec ${EXPLORER} \
  --genesis-file ${GENESISJSON} \
  --config ${CONFIGFILE} \

                      
echo "$TARGETNODES"

                      
-
GENERATOR="cabal v2-run exe:cardano-cli -- "
+
RUNNER=${RUNNER:-cabal v2-run -v0}
+
GENERATOR="${RUNNER} cardano-cli --"
+

                      
exec ${GENERATOR} \
  generate-txs \
  --config ${CONFIGFILE} \