-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquickstart.sh
More file actions
60 lines (52 loc) · 1.86 KB
/
quickstart.sh
File metadata and controls
60 lines (52 loc) · 1.86 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
#!/bin/bash
set -e
echo "=================================="
echo "HTTP Benchmark Suite - Quick Start"
echo "=================================="
echo ""
# Check prerequisites
echo "Checking prerequisites..."
command -v go >/dev/null 2>&1 || { echo "Error: Go is not installed"; exit 1; }
command -v gcc >/dev/null 2>&1 || { echo "Error: GCC is not installed"; exit 1; }
command -v g++ >/dev/null 2>&1 || { echo "Error: G++ is not installed"; exit 1; }
command -v make >/dev/null 2>&1 || { echo "Error: Make is not installed"; exit 1; }
command -v python3 >/dev/null 2>&1 || { echo "Error: Python3 is not installed"; exit 1; }
command -v node >/dev/null 2>&1 || { echo "Error: Node.js is not installed"; exit 1; }
command -v nginx >/dev/null 2>&1 || { echo "Error: Nginx is not installed"; exit 1; }
echo "✓ All prerequisites found"
echo ""
# Install Python dependencies
echo "Installing Python dependencies..."
cd api/python-fastapi
pip3 install -q -r requirements.txt
cd ../..
echo "✓ Python dependencies installed"
echo ""
# Download Go modules
echo "Downloading Go modules..."
go mod download
echo "✓ Go modules downloaded"
echo ""
# Build benchrunner
echo "Building benchrunner CLI..."
go build -o bin/benchrunner ./cmd/benchrunner
chmod +x bin/benchrunner
echo "✓ Benchrunner built"
echo ""
# Build all binaries
echo "Building load test tool and servers..."
./bin/benchrunner build
echo "✓ All binaries built"
echo ""
echo "=================================="
echo "Setup complete!"
echo "=================================="
echo ""
echo "Available commands:"
echo " ./bin/benchrunner list # List available servers"
echo " ./bin/benchrunner run # Run all benchmarks (default: 100 conns, 10s)"
echo " ./bin/benchrunner run -c 500 -d 30 # Custom benchmark"
echo ""
echo "Example:"
echo " ./bin/benchrunner run --connections 200 --duration 20"
echo ""