Files
hakmem/benchmarks/scripts/run_full_benchmark.sh
Moe Charm (CI) 52386401b3 Debug Counters Implementation - Clean History
Major Features:
- Debug counter infrastructure for Refill Stage tracking
- Free Pipeline counters (ss_local, ss_remote, tls_sll)
- Diagnostic counters for early return analysis
- Unified larson.sh benchmark runner with profiles
- Phase 6-3 regression analysis documentation

Bug Fixes:
- Fix SuperSlab disabled by default (HAKMEM_TINY_USE_SUPERSLAB)
- Fix profile variable naming consistency
- Add .gitignore patterns for large files

Performance:
- Phase 6-3: 4.79 M ops/s (has OOM risk)
- With SuperSlab: 3.13 M ops/s (+19% improvement)

This is a clean repository without large log files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 12:31:14 +09:00

66 lines
2.1 KiB
Bash

#!/bin/bash
# Full benchmark with jemalloc & mimalloc via LD_PRELOAD
set -e
WARMUP=2
RUNS=50
OUTPUT="full_benchmark.csv"
echo "allocator,scenario,iterations,avg_ns,soft_pf,hard_pf,rss_kb,ops_per_sec" > "$OUTPUT"
SCENARIOS=("json" "mir" "vm" "mixed")
ALLOCATORS=(
"hakmem-baseline:./bench_allocators_hakmem:"
"hakmem-evolving:./bench_allocators_hakmem:"
"system:./bench_allocators_system:"
"jemalloc:./bench_allocators_system:LD_PRELOAD=/lib/x86_64-linux-gnu/libjemalloc.so.2"
"mimalloc:./bench_allocators_system:LD_PRELOAD=/lib/x86_64-linux-gnu/libmimalloc.so.2"
)
total_runs=$((${#ALLOCATORS[@]} * ${#SCENARIOS[@]} * RUNS))
current=0
echo "========================================"
echo "Full Benchmark: jemalloc & mimalloc"
echo "========================================"
echo "Warmup: $WARMUP, Runs: $RUNS"
echo "Total: $total_runs runs"
echo ""
for alloc_spec in "${ALLOCATORS[@]}"; do
IFS=':' read -r alloc_name binary env_prefix <<< "$alloc_spec"
echo "📊 Allocator: $alloc_name"
for scenario in "${SCENARIOS[@]}"; do
echo " Scenario: $scenario"
# Warmup
for ((i=1; i<=WARMUP; i++)); do
if [ -n "$env_prefix" ]; then
$env_prefix $binary --allocator "$alloc_name" --scenario "$scenario" --iterations 1 >> /dev/null 2>&1 || true
else
$binary --allocator "$alloc_name" --scenario "$scenario" --iterations 1 >> /dev/null 2>&1 || true
fi
done
# Real runs
for ((i=1; i<=RUNS; i++)); do
current=$((current + 1))
printf "\r Progress: %d/%d" "$current" "$total_runs"
if [ -n "$env_prefix" ]; then
$env_prefix $binary --allocator "$alloc_name" --scenario "$scenario" --iterations 1 2>/dev/null | grep "^$alloc_name," >> "$OUTPUT" || true
else
$binary --allocator "$alloc_name" --scenario "$scenario" --iterations 1 2>/dev/null | grep "^$alloc_name," >> "$OUTPUT" || true
fi
done
echo ""
done
done
echo ""
echo "✅ Benchmark completed: $OUTPUT"
wc -l "$OUTPUT"