投稿日: 2014/06/22 1:56:22
テキスト ボックス
[mypc]$ more format-curl.txt\nurl_effective        : %{url_effective}\nhttp_code            : %{http_code}\nhttp_connect         : %{http_connect}\ntime_namelookup      : %{time_namelookup}\ntime_connect         : %{time_connect}\ntime_pretransfer     : %{time_pretransfer}\ntime_starttransfer   : %{time_starttransfer}\ntime_redirect        : %{time_redirect}\ntime_total           : %{time_total}\n-----------------------------------------------------------\nsize_download        : %{size_download}\nspeed_download       : %{speed_download}\n[mypc]$[mypc]$ more sample.sh#!/bin/bashURL=$1curl -w "@format-curl.txt" -o /dev/null -L $URL[mypc]$[mypc]$ sample.sh http://foo.co.jpurl_effective        : http://foo.co.jphttp_code            : 200http_connect         : 000time_namelookup      : 0.001time_connect         : 0.027time_pretransfer     : 0.165time_starttransfer   : 0.641time_redirect        : 0.772time_total           : 1.450-----------------------------------------------------------size_download        : 34322speed_download       : 23672.000手元にWindowsがないためMacからの実行結果ですが curlのライブラリーで、Webサイトパフォーマンスが測定できます。DNS名前解決の時間、リダイレクトの時間、リクエストを出してからファーストバイトを受け取るまでの時間など。Windowsの場合は、バッチやスクリプトを同じように作れば、Webサイトのダウンロード速度や詳細にブレイクダウンしてパフォーマンスが測定できます。