Statistics on DNS resolution, connection and SSL negotiation time for HTTP(S) endpoints.
Requires:
- curl
- bash
How to use:
- Download the
test-endpoint.sh
script - Run it giving it a number of iterations and a URL
e.g.
$ bash test-endpoint.sh 4 images.contentful.com/cfexampleapi/1x0xpXu4pSGS4OukSyWGUK/cc1239c6385428ef26f4180190532818/doge.jpg
{ "dns": "0.524", "conn": "0.552", "ssl": "0.000", "total": "0.946" }
{ "dns": "0.005", "conn": "0.033", "ssl": "0.000", "total": "0.425" }
{ "dns": "0.005", "conn": "0.035", "ssl": "0.000", "total": "0.426" }
{ "dns": "0.004", "conn": "0.034", "ssl": "0.000", "total": "0.447" }
Output can optionally be pretty-printed with the jq tool (https://stedolan.github.io/jq/)
$ bash test-endpoint.sh 4 images.contentful.com/cfexampleapi/1x0xpXu4pSGS4OukSyWGUK/cc1239c6385428ef26f4180190532818/doge.jpg | jq .
{
"dns": "0.005",
"conn": "0.034",
"ssl": "0.000",
"total": "0.441"
}
{
"dns": "0.005",
"conn": "0.033",
"ssl": "0.000",
"total": "0.427"
}
{
"dns": "0.004",
"conn": "0.036",
"ssl": "0.000",
"total": "0.430"
}
{
"dns": "0.004",
"conn": "0.034",
"ssl": "0.000",
"total": "0.430"
}