From 52da6ca298e8e62ccd1639f985c79548d8c1fe2b Mon Sep 17 00:00:00 2001 From: Dylan Socolobsky Date: Fri, 29 Nov 2024 15:34:10 -0300 Subject: [PATCH] script that watches balance of account --- Makefile | 6 ++++++ flamegraph.sh | 13 +++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 flamegraph.sh diff --git a/Makefile b/Makefile index 5412ccfea..f292d94ee 100644 --- a/Makefile +++ b/Makefile @@ -105,3 +105,9 @@ clean-hive-logs: ## 🧹 Clean Hive logs loc: cargo run -p loc + +flamegraph: + sudo -E CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph --bin ethrex --features dev -- --network test_data/genesis-l2.json --http.port 1729 + +test-load: + ethrex_l2 test load --path ./test_data/private_keys.txt -i 1000 -v --value 10000000 --to 0xFCbaC0713ACf16708aB6BC977227041FA1BC618D diff --git a/flamegraph.sh b/flamegraph.sh new file mode 100644 index 000000000..cb853f1c0 --- /dev/null +++ b/flamegraph.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +output=$(cast balance 0xFCbaC0713ACf16708aB6BC977227041FA1BC618D --rpc-url=http://localhost:1729 2>&1) +end_val=$((172 * 1000 * 10000000)) +echo "ini $output" +echo "end $end_val" +while [[ $output -le $end_val ]]; do + sleep 5 + output=$(cast balance 0xFCbaC0713ACf16708aB6BC977227041FA1BC618D --rpc-url=http://localhost:1729 2>&1) + echo "out $output" +done + +echo "fin $output"