-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_benchmarks.sh
More file actions
executable file
·43 lines (34 loc) · 1.17 KB
/
Copy pathrun_benchmarks.sh
File metadata and controls
executable file
·43 lines (34 loc) · 1.17 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
#!/bin/bash
echo "IoTD Performance Benchmarks"
echo "=========================="
echo
# Make sure we're in release mode
cargo build --release --example load_test
# Start the server in background with ERROR level logging for performance
echo "Starting IoTD server (with ERROR log level for performance)..."
RUST_LOG=error ./target/release/iotd &
SERVER_PID=$!
sleep 2
echo
echo "Test 1: Memory footprint with 1000 connections"
echo "----------------------------------------------"
./target/release/examples/load_test localhost:1883 50 950 64 1 30
echo
echo "Test 2: Maximum throughput (small messages)"
echo "------------------------------------------"
./target/release/examples/load_test localhost:1883 10 10 64 1000 30
echo
echo "Test 3: Maximum throughput (medium messages)"
echo "-------------------------------------------"
./target/release/examples/load_test localhost:1883 10 10 1024 100 30
echo
echo "Test 4: Stress test (many publishers)"
echo "-------------------------------------"
./target/release/examples/load_test localhost:1883 100 100 256 50 30
# Stop the server
echo
echo "Stopping server..."
kill $SERVER_PID
wait $SERVER_PID 2>/dev/null
echo
echo "Benchmark complete!"