forked from ruvnet/RuVector
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·118 lines (102 loc) · 2.91 KB
/
setup.sh
File metadata and controls
executable file
·118 lines (102 loc) · 2.91 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/bin/bash
#
# RuVector Benchmark Setup Script
# Sets up the benchmarking environment
#
set -e
echo "=========================================="
echo "RuVector Benchmark Suite Setup"
echo "=========================================="
echo ""
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Check if k6 is installed
echo -n "Checking for k6... "
if command -v k6 &> /dev/null; then
echo -e "${GREEN}✓ Found k6 $(k6 version --quiet)${NC}"
else
echo -e "${RED}✗ k6 not found${NC}"
echo ""
echo "Please install k6:"
echo " macOS: brew install k6"
echo " Linux: See https://k6.io/docs/getting-started/installation/"
echo " Windows: choco install k6"
exit 1
fi
# Check if Node.js is installed
echo -n "Checking for Node.js... "
if command -v node &> /dev/null; then
echo -e "${GREEN}✓ Found Node.js $(node --version)${NC}"
else
echo -e "${RED}✗ Node.js not found${NC}"
echo "Please install Node.js v18 or higher"
exit 1
fi
# Check if TypeScript is installed
echo -n "Checking for TypeScript... "
if command -v ts-node &> /dev/null; then
echo -e "${GREEN}✓ Found ts-node${NC}"
else
echo -e "${YELLOW}! ts-node not found, installing...${NC}"
npm install -g typescript ts-node
fi
# Check for Claude Flow (optional)
echo -n "Checking for Claude Flow... "
if command -v claude-flow &> /dev/null; then
echo -e "${GREEN}✓ Found claude-flow${NC}"
HOOKS_ENABLED=true
else
echo -e "${YELLOW}! claude-flow not found (optional)${NC}"
HOOKS_ENABLED=false
fi
# Create results directory
echo -n "Creating results directory... "
mkdir -p results
echo -e "${GREEN}✓${NC}"
# Set up environment
echo ""
echo "Setting up environment..."
echo ""
# Prompt for BASE_URL
read -p "Enter RuVector cluster URL (default: http://localhost:8080): " BASE_URL
BASE_URL=${BASE_URL:-http://localhost:8080}
# Create .env file
cat > .env << EOF
# RuVector Benchmark Configuration
BASE_URL=${BASE_URL}
PARALLEL=1
ENABLE_HOOKS=${HOOKS_ENABLED}
LOG_LEVEL=info
# Optional: Slack notifications
# SLACK_WEBHOOK_URL=https://hooks.slack.com/services/...
# Optional: Email notifications
# EMAIL_NOTIFICATION=team@example.com
EOF
echo -e "${GREEN}✓ Created .env file${NC}"
# Make scripts executable
chmod +x setup.sh
chmod +x benchmark-runner.ts 2>/dev/null || true
echo ""
echo "=========================================="
echo -e "${GREEN}Setup Complete!${NC}"
echo "=========================================="
echo ""
echo "Quick Start:"
echo ""
echo " # List available scenarios"
echo " ts-node benchmark-runner.ts list"
echo ""
echo " # Run quick validation (45 minutes)"
echo " ts-node benchmark-runner.ts run baseline_100m"
echo ""
echo " # Run standard test suite"
echo " ts-node benchmark-runner.ts group standard_suite"
echo ""
echo " # View results"
echo " open visualization-dashboard.html"
echo ""
echo "For detailed documentation, see README.md"
echo ""