-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbench.sh
More file actions
executable file
·71 lines (54 loc) · 2.48 KB
/
Copy pathbench.sh
File metadata and controls
executable file
·71 lines (54 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
# Muse Benchmark Runner
#
# This script runs comprehensive performance benchmarks for the Muse music player
# and generates detailed reports.
set -e
echo "🎵 Muse Performance Benchmark Suite"
echo "======================================"
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Create reports directory
REPORTS_DIR="target/criterion"
mkdir -p "$REPORTS_DIR"
echo -e "${BLUE}Building optimized release version...${NC}"
cargo build --release
echo -e "${BLUE}Running comprehensive benchmarks...${NC}"
# Run different benchmark categories
echo -e "${YELLOW}1. Algorithm Performance Benchmarks${NC}"
cargo bench --bench muse_benchmarks algorithm_scoring
echo -e "${YELLOW}2. Database Operations Benchmarks${NC}"
cargo bench --bench muse_benchmarks database_operations
echo -e "${YELLOW}3. Queue Generation Benchmarks${NC}"
cargo bench --bench muse_benchmarks queue_generation
echo -e "${YELLOW}4. Path Translation Benchmarks${NC}"
cargo bench --bench muse_benchmarks path_translation
echo -e "${YELLOW}5. Song Search Benchmarks${NC}"
cargo bench --bench muse_benchmarks song_search
echo -e "${YELLOW}6. Memory Operations Benchmarks${NC}"
cargo bench --bench muse_benchmarks memory_operations
echo -e "${GREEN}✅ All benchmarks completed!${NC}"
# Check if HTML reports were generated
if [ -d "$REPORTS_DIR" ]; then
echo -e "${BLUE}📊 Benchmark reports generated in: $REPORTS_DIR${NC}"
echo -e "${BLUE}📈 View HTML reports by opening: $REPORTS_DIR/muse_benchmarks/report/index.html${NC}"
else
echo -e "${YELLOW}⚠️ HTML reports not found. Install gnuplot for graphical reports.${NC}"
fi
echo -e "${GREEN}🎯 Benchmark Summary:${NC}"
echo "• Algorithm scoring: Individual song scoring, batch processing, ranking"
echo "• Database ops: Query performance, inserts, updates, connection lookups"
echo "• Queue generation: Current, Thread, Stream queue strategies"
echo "• Path translation: File path conversion between formats"
echo "• Song search: Multi-strategy search with different query patterns"
echo "• Memory ops: Large data structures, string operations, vector manipulations"
echo -e "${BLUE}💡 Tips:${NC}"
echo "• Run 'cargo bench' for quick benchmarks"
echo "• Use 'cargo bench -- --help' for more options"
echo "• Compare results across different systems and configurations"
echo "• Monitor performance regression with CI/CD integration"
echo -e "${GREEN}🎵 Happy benchmarking!${NC}"