Skip to content

Commit ab2898a

Browse files
committed
Address bot review on PR 495
1 parent dff941f commit ab2898a

2 files changed

Lines changed: 10 additions & 18 deletions

File tree

prover/src/instruments.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ pub fn print_report(
7575
row_top("Pre-pass (domains/twiddles)", mp.prepass, total);
7676
row_top("Round 1", round1, total);
7777
row_sub(" Main trace commits", mp.main_commits, total);
78-
row_sub(" expand_pool_to_lde", mp.round1_sub.main_lde, total);
79-
row_sub(" commit (Merkle)", mp.round1_sub.main_merkle, total);
78+
row_sub(" Main expand_pool_to_lde", mp.round1_sub.main_lde, total);
79+
row_sub(" Main commit (Merkle)", mp.round1_sub.main_merkle, total);
8080
row_sub(" Aux trace build (parallel)", mp.aux_build, total);
8181
row_sub(" Aux trace commit", mp.aux_commit, total);
82-
row_sub(" expand_pool_to_lde", mp.round1_sub.aux_lde, total);
83-
row_sub(" commit (Merkle)", mp.round1_sub.aux_merkle, total);
82+
row_sub(" Aux expand_pool_to_lde", mp.round1_sub.aux_lde, total);
83+
row_sub(" Aux commit (Merkle)", mp.round1_sub.aux_merkle, total);
8484
row_top("Rounds 2\u{2013}4", mp.rounds_2_4, total);
8585

8686
// Merge split tables: MEMW[0..4] → MEMW x5

scripts/bench_timing_profile.sh

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ set -euo pipefail
1111

1212
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1313
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
14-
TMP_DIR="/tmp/bench_timing_profile"
14+
TMP_DIR="$(mktemp -d)"
15+
trap 'rm -rf "$TMP_DIR"' EXIT
1516
ELF_DIR="$ROOT_DIR/executor/program_artifacts/asm"
1617

1718
GREEN='\033[0;32m'
@@ -39,7 +40,6 @@ suffix_to_steps() {
3940
esac
4041
}
4142

42-
rm -rf "$TMP_DIR" && mkdir -p "$TMP_DIR"
4343

4444
if $BUILD; then
4545
echo -e "${GREEN}Building CLI with instruments...${NC}"
@@ -49,10 +49,8 @@ fi
4949
CLI="$ROOT_DIR/target/release/cli"
5050

5151
# Parse instruments stderr into key=value pairs.
52-
# Uses occurrence counting to disambiguate expand_pool_to_lde and commit (Merkle).
5352
parse_timing() {
5453
awk '
55-
BEGIN { lde_n = 0; merkle_n = 0 }
5654
function secs( s) {
5755
if (match($0, /[0-9]+\.[0-9]+s/)) {
5856
s = substr($0, RSTART, RLENGTH - 1)
@@ -69,16 +67,10 @@ parse_timing() {
6967
/Aux trace build/ { v = secs(); if (v) print "aux_build=" v }
7068
/Aux trace commit/ { v = secs(); if (v) print "aux_commit=" v }
7169
/Rounds 2/ { v = secs(); if (v) print "rounds24=" v }
72-
/expand_pool_to_lde/ && !/R1 expand/ {
73-
lde_n++; v = secs()
74-
if (v && lde_n == 1) print "main_lde=" v
75-
if (v && lde_n == 2) print "aux_lde=" v
76-
}
77-
/commit \(Merkle\)/ {
78-
merkle_n++; v = secs()
79-
if (v && merkle_n == 1) print "main_merkle=" v
80-
if (v && merkle_n == 2) print "aux_merkle=" v
81-
}
70+
/Main expand_pool_to_lde/ { v = secs(); if (v) print "main_lde=" v }
71+
/Aux expand_pool_to_lde/ { v = secs(); if (v) print "aux_lde=" v }
72+
/Main commit \(Merkle\)/ { v = secs(); if (v) print "main_merkle=" v }
73+
/Aux commit \(Merkle\)/ { v = secs(); if (v) print "aux_merkle=" v }
8274
/R1 expand_pool_to_lde/ { v = secs(); if (v) print "r1_lde=" v }
8375
/R2 evaluate/ { v = secs(); if (v) print "r2_evaluate=" v }
8476
/R2 decompose/ { v = secs(); if (v) print "r2_decompose=" v }

0 commit comments

Comments
 (0)