Skip to content

Instantly share code, notes, and snippets.

@afuggini
Forked from sandeepraju/ttfb.sh
Created January 11, 2019 05:29
Show Gist options
  • Save afuggini/adb237eea7093c6d46d889f7acc1dc9f to your computer and use it in GitHub Desktop.
Save afuggini/adb237eea7093c6d46d889f7acc1dc9f to your computer and use it in GitHub Desktop.

Revisions

  1. @sandeepraju sandeepraju created this gist Jul 20, 2016.
    12 changes: 12 additions & 0 deletions ttfb.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    #!/bin/bash
    # file: ttfb.sh
    # curl command to check the time to first byte
    # ** usage **
    # 1. ./ttfb.sh "https://google.com"
    # 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com"

    curl -o /dev/null \
    -H 'Cache-Control: no-cache' \
    -s \
    -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" \
    $1