From f890f96ffc55fb358fc161144ebde028bdf9ced3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 3 Dec 2024 14:59:44 -0300 Subject: [PATCH] Add benchmark scripts --- scripts/run_benchmark.sh | 12 ++++++++++++ scripts/run_tx_benchmark.sh | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100755 scripts/run_benchmark.sh create mode 100755 scripts/run_tx_benchmark.sh diff --git a/scripts/run_benchmark.sh b/scripts/run_benchmark.sh new file mode 100755 index 00000000..c35165ea --- /dev/null +++ b/scripts/run_benchmark.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +START=874000 +END=874009 +NET=mainnet +LAPS=100 + +output="block-$START-$END-$NET.jsonl" + +cargo run --release --features benchmark,structured_logging bench-block-range $START $END $NET $LAPS | tee "native-$output" + +cargo run --release --features benchmark,structured_logging,only_cairo_vm bench-block-range $START $END $NET $LAPS | tee "vm-$output" diff --git a/scripts/run_tx_benchmark.sh b/scripts/run_tx_benchmark.sh new file mode 100755 index 00000000..4d1c5eb0 --- /dev/null +++ b/scripts/run_tx_benchmark.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +TX=0x01e06dfbd41e559ee5edd313ab95605331873a5aed09bf1c7312456b7aa2a1c7 +BLOCK=291652 +LAPS=10000 +NET=testnet + +output="tx-$TX-$NET.jsonl" + +cargo run --release --features benchmark,structured_logging bench-tx $TX $NET $BLOCK $LAPS | tee "native-$output" + +cargo run --release --features benchmark,structured_logging,only_cairo_vm bench-tx $TX $NET $BLOCK $LAPS | tee "vm-$output"