Last active
October 18, 2025 15:32
-
-
Save Raimo33/0cff39ea0bdc812663504bd857a95af9 to your computer and use it in GitHub Desktop.
Find Throwing Bitcoin Core Benchmarks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -u | |
| out_file="benchmarks_throwing_exception.txt" | |
| log="$(mktemp)" | |
| mapfile -t benches < <(./build/bin/bench_bitcoin --list) | |
| rm -f "$out_file" | |
| for bench in "${benches[@]}"; do | |
| bench="${bench%%$'\r'}" | |
| [ -z "$bench" ] && continue | |
| filter="^${bench}$" | |
| safe_name=$(printf '%s' "$bench" | tr '/ ' '__') | |
| ./build/bin/bench_bitcoin --filter="$filter" --min-time=1 >"$log" 2>&1 | |
| exit_code=$? | |
| if grep -q -E '(Assertion.*failed)' "$log"; then | |
| echo "$bench" >> "$out_file" | |
| fi | |
| echo "Tested bench: $bench" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to use just add:
assert(false);to the functions you want to benchmark