#!/usr/bin/env bash # dev_pool_tls.sh - Pool TLS Phase 1.5a 開発サイクル統合スクリプト # # Build → Verify → Quick Test の一連の流れを自動化 set -euo pipefail ACTION="${1:-test}" TARGET="${2:-bench_mid_large_mt_hakmem}" case "$ACTION" in build) echo "🔨 Building Pool TLS Phase 1.5a..." ./build_pool_tls.sh "$TARGET" ;; verify) echo "🔍 Verifying build..." ./verify_build.sh "$TARGET" ;; test) echo "=========================================" echo " 🚀 Pool TLS Phase 1.5a Dev Cycle" echo "=========================================" echo "" # 1. Build echo "📦 Step 1/3: Building..." ./build_pool_tls.sh "$TARGET" >/dev/null 2>&1 echo "✓ Build complete" # 2. Verify echo "🔍 Step 2/3: Verifying..." if ./verify_build.sh "$TARGET" >/dev/null 2>&1; then echo "✓ Build verification passed" else echo "❌ Build verification FAILED" exit 1 fi # 3. Quick smoke test echo "🧪 Step 3/3: Quick smoke test..." RESULT=$(timeout 10 ./"$TARGET" 1 100 256 42 2>&1 | grep "Throughput" || echo "FAILED") if [[ "$RESULT" == *"FAILED"* ]]; then echo "❌ Smoke test FAILED" exit 1 fi OPS=$(echo "$RESULT" | awk '{print $3}') echo "✓ Smoke test passed: $OPS ops/s" echo "" echo "=========================================" echo " ✅ All checks passed!" echo "=========================================" echo "" echo "💡 Next steps:" echo " # Full benchmark" echo " ./run_pool_bench.sh" echo "" echo " # Debug if needed" echo " ./build_debug.sh $TARGET gdb" echo " gdb ./$TARGET" ;; bench) echo "📊 Running full benchmark..." ./run_pool_bench.sh ;; clean) echo "🧹 Cleaning build artifacts..." make clean >/dev/null 2>&1 || true echo "✓ Clean complete" ;; *) echo "Usage: $0 {build|verify|test|bench|clean} [target]" echo "" echo "Actions:" echo " build - Build Pool TLS Phase 1.5a" echo " verify - Verify build integrity" echo " test - Build + Verify + Quick smoke test (default)" echo " bench - Run full benchmark vs System malloc" echo " clean - Clean build artifacts" echo "" echo "Examples:" echo " $0 test # Quick dev cycle" echo " $0 bench # Full benchmark" echo " $0 build larson_hakmem # Build Larson test" exit 1 ;; esac