Skip to content

Instantly share code, notes, and snippets.

View bogdanbarna's full-sized avatar

Bogdan Barna bogdanbarna

  • Romania
  • 00:07 (UTC +03: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
2020/11/03 19:24:21 [INFO] Terraform version: 0.13.5
2020/11/03 19:24:21 [INFO] Go runtime version: go1.14.7
2020/11/03 19:24:21 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/2.0.0/versions/0.13.5/terraform", "apply", "-var", "name_prefix=laaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaarge"}
2020/11/03 19:24:21 [DEBUG] Attempting to open CLI config file: <home>/.terraformrc
2020/11/03 19:24:21 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/11/03 19:24:21 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/11/03 19:24:21 [DEBUG] ignoring non-existing provider search directory <home>/.terraform.d/plugins
2020/11/03 19:24:21 [DEBUG] ignoring non-existing provider search directory <home>/Library/Application Support/io.terraform/plugins
2020/11/03 19:24:21 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2020/11/03 19:24:21 [INFO] CLI command args: []string{"apply", "-var", "name_prefix=laaaaaaaaaaaaaaaaaaaaaaaaaaaaa