Files
cv-site/test_concurrency.sh
T
juanatsap 92dffe8c60 feat: add comprehensive testing infrastructure and security hardening
- Enhanced CI/CD pipeline with coverage reporting, benchmarks, and artifact uploads
- Implemented rate limiter IP validation with proxy support and spoofing protection
- Added extensive Makefile test targets for coverage, benchmarks, and continuous testing
- Expanded middleware chain with request validation, size limits, and suspicious activity logging
2025-11-11 21:43:12 +00:00

27 lines
579 B
Bash
Executable File

#!/bin/bash
echo "=== Thread Safety Test ==="
echo "Starting 20 concurrent clients making 10 requests each..."
start=$(date +%s.%N)
for i in $(seq 1 20); do
{
for j in $(seq 1 10); do
curl -s -o /dev/null 'http://localhost:1999/?lang=en' || true
done
} &
done
wait
end=$(date +%s.%N)
elapsed=$(echo "$end - $start" | bc)
echo ""
echo "All 200 requests completed in ${elapsed}s"
echo "Throughput: $(echo "scale=2; 200 / $elapsed" | bc) req/s"
echo ""
echo "=== Cache Statistics After Concurrent Test ==="
curl -s http://localhost:1999/health | jq '.cache'