- Archive: 85 agent .txt files → docs/archive/agents/legacy_txt/ - Scripts: Move 110 shell scripts → scripts/ (keep deploy.sh in root) - Models: Move 18 .safetensors → ml/models/checkpoints/training_artifacts/ - Delete: 34 directories (~33GB freed) - target/, coverage_*, test artifacts - Build: Clean 14 build artifacts (.rlib, .o, .pid, binaries) - Tests: Move 14 .rs files → tests/standalone/ - SQL: Move 5 files → sql/ (keep init-db*.sql for Docker) - Wave 153: Archive to docs/archive/historical/wave153/ - Docs: Archive 9 markdown files to wave_d/reports/ and historical/ Total impact: ~34GB freed (both waves), root directory cleaned from 583 to ~40 essential files Directory count reduced from 65 to 31 (52% reduction) All historical data preserved in organized archive structure
74 lines
2.5 KiB
Bash
Executable File
74 lines
2.5 KiB
Bash
Executable File
#!/bin/bash
|
|
# Comprehensive Performance Benchmark Runner
|
|
# Wave 125 - Agent 90
|
|
|
|
set -e
|
|
|
|
echo "╔════════════════════════════════════════════════════════════════╗"
|
|
echo "║ Foxhunt HFT System - Comprehensive Performance Suite ║"
|
|
echo "╚════════════════════════════════════════════════════════════════╝"
|
|
echo ""
|
|
|
|
# Color codes
|
|
GREEN='\033[0;32m'
|
|
BLUE='\033[0;34m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m' # No Color
|
|
|
|
# Create output directory
|
|
OUTPUT_DIR="benchmark_results_$(date +%Y%m%d_%H%M%S)"
|
|
mkdir -p "$OUTPUT_DIR"
|
|
|
|
echo -e "${BLUE}Output directory: $OUTPUT_DIR${NC}"
|
|
echo ""
|
|
|
|
# Function to run benchmark category
|
|
run_benchmark() {
|
|
local category=$1
|
|
local name=$2
|
|
|
|
echo -e "${YELLOW}Running $name...${NC}"
|
|
cargo bench -p trading_engine --bench comprehensive_performance "$category" \
|
|
2>&1 | tee "$OUTPUT_DIR/${category}_benchmark.log"
|
|
echo -e "${GREEN}✓ $name complete${NC}"
|
|
echo ""
|
|
}
|
|
|
|
# 1. Order Processing
|
|
run_benchmark "order_processing" "Order Processing Benchmarks"
|
|
|
|
# 2. Position Management
|
|
run_benchmark "position_management" "Position Management Benchmarks"
|
|
|
|
# 3. Market Data
|
|
run_benchmark "market_data" "Market Data Processing Benchmarks"
|
|
|
|
# 4. Risk Management
|
|
run_benchmark "risk_management" "Risk Management Benchmarks"
|
|
|
|
# 5. Compliance
|
|
run_benchmark "compliance" "Compliance & Audit Benchmarks"
|
|
|
|
# 6. Throughput
|
|
run_benchmark "throughput" "Throughput Validation Benchmarks"
|
|
|
|
# 7. Memory
|
|
run_benchmark "memory" "Memory Efficiency Benchmarks"
|
|
|
|
# 8. Comprehensive Validation
|
|
run_benchmark "validation" "Comprehensive Target Validation"
|
|
|
|
echo ""
|
|
echo "╔════════════════════════════════════════════════════════════════╗"
|
|
echo "║ All Benchmarks Complete ║"
|
|
echo "╚════════════════════════════════════════════════════════════════╝"
|
|
echo ""
|
|
echo -e "${GREEN}Results saved to: $OUTPUT_DIR/${NC}"
|
|
echo ""
|
|
echo "View HTML report:"
|
|
echo " open target/criterion/report/index.html"
|
|
echo ""
|
|
echo "View logs:"
|
|
echo " ls -lh $OUTPUT_DIR/"
|
|
echo ""
|