Skip to content

Instantly share code, notes, and snippets.

View bogdanbarna's full-sized avatar

Bogdan Barna bogdanbarna

  • Romania
  • 07:42 (UTC +02:00)
View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@bogdanbarna
bogdanbarna / curl-time-it.sh
Created April 12, 2021 09:23
Time response with cURL
#!/bin/bash
# Shamelessly copied from
# https://blog.josephscott.org/2011/10/14/timing-details-with-curl/
if [[ -n $DEBUG ]]; then set -x; fi
set -euf
curl -w @- -o /dev/null -s "$@" <<'EOF'
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n