Monitoring bash Intermediate

HTTP Response Time Benchmark

Measure real HTTP endpoint latency across 100 requests and compute p50/p95/p99.

bash
#!/bin/bash
URL=$1
TIMES=$(for i in $(seq 1 100); do
  curl -s -o /dev/null -w "%{time_total}
" "$URL"
done | sort -n)

p50=$(echo "$TIMES" | awk "NR==50{print}")
p95=$(echo "$TIMES" | awk "NR==95{print}")
p99=$(echo "$TIMES" | awk "NR==99{print}")
echo "p50: ${p50}s  p95: ${p95}s  p99: ${p99}s"

Prerequisites

  • curl
  • awk

Pro Tips

  • → Use k6 or wrk for concurrent load testing.

Was this module useful?

Share your experience — it helps the team improve.

Leave Feedback

Commercial Licensing

Acquire a production access token or template license for enterprise deployment.

Module Info

Language
bash
Level
Intermediate
Read time
2 min
Published
Mar 2026
License
Commercial License

Newsletter

New modules every week, directly to your inbox.