Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,18 @@ lto = "fat"
codegen-units = 1
strip = "debuginfo"

# Iteration-speed sibling of `release`: thin LTO parallelizes the LTO
# stage across cores instead of fat LTO's single-threaded whole-graph
# pass — measured cold builds of the aisix binary on a 12-core host:
# 6m37s (release) vs 2m27s (release-dev). Functionally identical output,
# slightly less optimized — so any number that gets reported, compared
# against a baseline, or fed into the saturation grid MUST come from
# `--release`, never from this profile.
[profile.release-dev]
inherits = "release"
lto = "thin"
codegen-units = 16

[profile.coverage]
inherits = "dev"
opt-level = 0
Expand Down
7 changes: 6 additions & 1 deletion bench/onthebench/run-baseline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ BIN="$SRC/target/release/aisix"

# ---- sanity -----------------------------------------------------------------

[ -x "$BIN" ] || { echo "FATAL: $BIN missing - build first"; exit 1; }
# Rebuild instead of trusting mtime: with iteration builds living in
# target/release-dev, a stale target/release binary is silent poison —
# meta.json would attribute the numbers to the wrong commit. A no-op
# when the binary is already current.
( cd "$SRC" && cargo build --locked --release --bin aisix )
[ -x "$BIN" ] || { echo "FATAL: $BIN missing after build"; exit 1; }
rig_sanity
if [ "$FLAMEGRAPH" = 1 ]; then require_symbols "$BIN"; fi

Expand Down
5 changes: 4 additions & 1 deletion bench/onthebench/run-decay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ BIN="$SRC/target/release/aisix"

# ---- sanity -----------------------------------------------------------------

[ -x "$BIN" ] || { echo "FATAL: $BIN missing - build first"; exit 1; }
# Rebuild instead of trusting mtime — same stale-binary gate as
# run-baseline.sh; a no-op when the binary is already current.
( cd "$SRC" && cargo build --locked --release --bin aisix )
[ -x "$BIN" ] || { echo "FATAL: $BIN missing after build"; exit 1; }
rig_sanity

bench_init
Expand Down