Browse Source

curl-speed: simple curl-based URL response time tester

master
Maxim Likhachev 4 years ago
parent
commit
f22feb7e97
  1. 1
      README.md
  2. 23
      scripts/curl-speed

1
README.md

@ -71,6 +71,7 @@ will create the symbolic link for each script in the \<path> directory. @@ -71,6 +71,7 @@ will create the symbolic link for each script in the \<path> directory.
## Network
- [check-cert](scripts/check-cert) retrieves information about web site's TLS certificate.
- [curl-speed](scripts/curl-speed) tests response time for specified URL.
- [ipcalc](scripts/ipcalc) is DIY tcl version of [jodies.de/ipcalc](https://jodies.de/ipcalc), it takes an IP address and netmask and calculates the resulting broadcast, network, Cisco wildcard mask, and host range.
## WWW

23
scripts/curl-speed

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
#!/usr/bin/env bash
#Создан: вс 03 окт 2021 13:41:35
#Изменён: вс 03 окт 2021 13:52:09
# Get response time for URL.
# (c) idea: https://sysadmin.pm/curl-site-speed/
IFS='' read -r -d '' OUTPUT_FORMAT <<-EOF
# Test response time for %{url_effective}
Lookup Time: %{time_namelookup}
Connect Time: %{time_connect}
AppCon Time: %{time_appconnect}
Redirect Time: %{time_redirect}
Pre-transfer Time: %{time_pretransfer}
Start-transfer Time: %{time_starttransfer}
Total Time: %{time_total}
EOF
curl -s -w "$OUTPUT_FORMAT" -o /dev/null "${1?USAGE: $(basename "$0" URL)}"
Loading…
Cancel
Save