Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
83 changes: 80 additions & 3 deletions .github/workflows/profiling-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ permissions:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUST_TOOLCHAIN: 1.92.0

jobs:
comprehensive-profiling:
Expand All @@ -56,7 +55,6 @@ jobs:
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@2b1f5e9b395427c92ee4e3331786ca3c37afe2d7 # v1.16.0
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
cache: false
rustflags: ""

Expand Down Expand Up @@ -112,6 +110,48 @@ jobs:
} >> "$GITHUB_ENV"
fi

- name: Capture profiling environment metadata
env:
BENCH_FILTER_VALUE: ${{ github.event.inputs.benchmark_filter || '' }}
run: |
set -euo pipefail

mkdir -p profiling-results

declared_toolchain="$(
grep -E '^[[:space:]]*channel[[:space:]]*=' rust-toolchain.toml 2>/dev/null \
| head -n 1 \
| cut -d '=' -f 2 \
| tr -d ' "' \
|| true
)"
rust_version="$(
grep -E '^rust-version[[:space:]]*=' Cargo.toml 2>/dev/null \
| head -n 1 \
| cut -d '=' -f 2 \
| tr -d ' "' \
|| true
)"
profiling_mode="production"
if [[ "${PROFILING_DEV_MODE:-}" == "1" ]]; then
profiling_mode="development"
fi

{
echo "# Profiling Environment"
echo
echo "- Code ref: ${GITHUB_REF_NAME}"
echo "- Commit: $(git rev-parse HEAD)"
echo "- Declared rust-toolchain.toml channel: ${declared_toolchain}"
echo "- Cargo.toml rust-version: ${rust_version}"
echo "- rustc: $(rustc --version)"
echo "- cargo: $(cargo --version)"
echo "- Cargo profile: perf"
echo "- Benchmark filter: ${BENCH_FILTER_VALUE:-All benchmarks}"
echo "- Profiling mode: ${profiling_mode}"
echo "- Runner: ${RUNNER_OS}"
} > profiling-results/environment_metadata.md

- name: Build profiling suite
run: |
# Build with the same perf profile used by `cargo bench --profile perf`
Expand Down Expand Up @@ -197,6 +237,7 @@ jobs:

- \`profiling_output.log\`: Complete benchmark output
- \`memory_profiling_detailed.log\`: Detailed memory allocation analysis
- \`environment_metadata.md\`: Code ref, compiler, profile, and filter metadata
- \`criterion/\`: HTML reports and detailed timing data

EOF
Expand Down Expand Up @@ -253,7 +294,6 @@ jobs:
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@2b1f5e9b395427c92ee4e3331786ca3c37afe2d7 # v1.16.0
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
cache: false
rustflags: ""

Expand All @@ -273,6 +313,42 @@ jobs:
echo "Running allocation API tests..."
cargo test --test allocation_api --features count-allocations --verbose

- name: Capture memory profiling environment metadata
run: |
set -euo pipefail

mkdir -p profiling-results

declared_toolchain="$(
grep -E '^[[:space:]]*channel[[:space:]]*=' rust-toolchain.toml 2>/dev/null \
| head -n 1 \
| cut -d '=' -f 2 \
| tr -d ' "' \
|| true
)"
rust_version="$(
grep -E '^rust-version[[:space:]]*=' Cargo.toml 2>/dev/null \
| head -n 1 \
| cut -d '=' -f 2 \
| tr -d ' "' \
|| true
)"

{
echo "# Memory Profiling Environment"
echo
echo "- Code ref: ${GITHUB_REF_NAME}"
echo "- Commit: $(git rev-parse HEAD)"
echo "- Declared rust-toolchain.toml channel: ${declared_toolchain}"
echo "- Cargo.toml rust-version: ${rust_version}"
echo "- rustc: $(rustc --version)"
echo "- cargo: $(cargo --version)"
echo "- Cargo profile: perf"
echo "- Benchmark filter: memory_profiling"
echo "- Profiling mode: development"
echo "- Runner: ${RUNNER_OS}"
} > profiling-results/environment_metadata.md

- name: Run memory scaling benchmarks
env:
PROFILING_DEV_MODE: "1"
Expand All @@ -292,5 +368,6 @@ jobs:
with:
name: memory-stress-results-${{ github.run_number }}
path: |
profiling-results/
target/criterion/
retention-days: 14
5 changes: 0 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ name = "circumsphere_containment"
path = "benches/circumsphere_containment.rs"
harness = false

[[bench]]
name = "microbenchmarks"
path = "benches/microbenchmarks.rs"
harness = false

[[bench]]
name = "topology_guarantee_construction"
path = "benches/topology_guarantee_construction.rs"
Expand Down
Loading
Loading