CICD-331 · Network latency measurement
Encyclopedia · Advanced networking and API testing · All snippets
Previous · CICD-330 · Next · CICD-332
1. Where it fits
- Placement CI run step or authorized lab terminal.
- Prerequisites authorized test service, known endpoint or local fixture and the named test CLI.
- Platforms local-linux, github-actions, gitea-actions.
- Parameters
HEALTH_URL.
2. Copy the snippet
bash
for i in $(seq 1 20); do curl -fsS -o /dev/null --max-time 4 -w '%{time_namelookup} %{time_connect} %{time_starttransfer} %{time_total}\n' "${HEALTH_URL:?}" || exit 1; done3. How it works
The request checks the selected HTTP interface. Timeouts limit waiting, and an explicit exit or payload condition determines pass and fail. The command archives or inspects the selected files. Verify the relative paths and file set before using the archive downstream.
4. Verify the result
Collect fresh-curl timings in seconds. These include client and protocol costs, so compare identical paths and environments.
Validation syntax-validated (Bash parse). Status definitions.