Skip to content

Instantly share code, notes, and snippets.

@ultrox
Forked from sandeepraju/ttfb.sh
Created January 2, 2018 17:49
Show Gist options
  • Save ultrox/f4b5e4e65ffeb25d1c1ab27204160f10 to your computer and use it in GitHub Desktop.
Save ultrox/f4b5e4e65ffeb25d1c1ab27204160f10 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