Webサイトは高速であればあるほど、ユーザ体験が向上して満足度向上につながります。その逆に遅いWebサイトはすぐにユーザが離れてしまいます。 そうしたWebサイトのパフォーマンスを第三者的に見られる仕組みを提供するのがSitespeed.ioです。詳細なレポーティングが可能で、定期的に測定することでWebサイトの改善につなげられるでしょう。

Mac OSXの場合、インストールはHomebrewでできます。

$ brew tap sitespeedio/sitespeedio
$ brew install sitespeedio/sitespeedio/sitespeed.io

終わるとsitespeed.ioコマンドが使えるようになります。ヘルプは以下の通りで、細かいオプションがたくさんあります。

$ sitespeed.io -h
usage: /usr/local/bin/sitespeed.io options

Sitespeed.io is a tool that helps you analyze your website performance and show you what you should optimize, more info at http://www.sitespeed.io.
To collect Browser Timings in Chrome & IE you need to install the ChromeDriver and the Internet Explorer Driver (Windows only)
Example: /usr/local/bin/sitespeed.io -u http://www.sitespeed.io -c chrome,firefox

OPTIONS:
   -h      Help
   -u      The start URL of the crawl: http[s]://host[:port][/path/]. Use this or use the -f file option.
   -f      The path to a plain text file with one URL on each row.
   -d      The crawl depth, default is 1 (one page and all links pointing to the same domain on that page) [optional]
   -q      Crawl URLs only URLs that contains this keyword in the path [optional]
   -s      Skip URLs that contains this keyword in the path [optional]
   -p      The number of processes that will analyze pages, default is 5 [optional]
   -m      The memory heap size for the Java applications, default is 1024 Mb [optional]
   -n      Give your test a name, it will be added to all HTML pages [optional]
   -o      The output format, always output as HTML and you can also output a CSV file for the detailed site summary page  (csv) [optional]
   -r      The result base directory, default is sitespeed-result [optional]
   -x      The proxy host & protocol: proxy.soulgalore.com:80 [optional]
   -t      The proxy type, default is http [optional]
   -a      The full User Agent string, default is Chrome for MacOSX. You can also set the value as iphone or ipad (will automagically change the viewport) [optional]
   -v      The view port, the page viewport size WidthxHeight, like 400x300, default is 1280x800 [optional]
   -y      The compiled YSlow file, default is dependencies/yslow-3.1.5-sitespeed.js [optional]
   -l      Which ruleset to use, default is the latest sitespeed.io version for desktop [optional]
   -g      The columns showed on detailed page summary table, see http://www.sitespeed.io/documentation/#config-columns for more info [optional]
   -b      The boxes showed on site summary page, see http://www.sitespeed.io/documentation/#config-boxes for more info [optional]
   -j      The max number of pages to test [optional]
   -k      Take screenshots for each page (using the configured view port). Default is false. (true|false) [optional]
   -c      Choose which browser to use to collect timing data. You can set multiple browsers in a comma sepratated list (firefox|chrome|ie) [optional]
   -z      The number of times you should test each URL when fetching timing metrics. Default is three times [optional]
   -V      Show the version of sitespeed.io

実際の測定としては-uでURLを渡します。

$ sitespeed.io -u http://www.moongift.jp/
Will crawl from start point http://www.moongift.jp/ with User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36 and viewport 1280x800 with crawl depth 1 using ruleset sitespeed.io-desktop ... this can take a while
Using sitespeed.io version 2.5.5
Using PhantomJS version 1.9.1
Using Java version 1.6.0_65
Using BrowserTime version 0.6
From IP 125.30.18.191
Will analyze 194 pages
Analyzing http://www.moongift.jp/
Analyzing http://www.moongift.jp/2009/11
:

MOONGIFTではレポートを作る際に失敗してしまったのでデモサイトのスクリーンショットになります。

サイトの速度、JavaScriptのヘッダー読み込みがないかなどがチェックできます。

さらに細かいレポート。

URLごとのJavaScript読み込み数、スタイルシートなど細かくチェックされています。

改善点の一覧が出ています。

良く使われているリソースファイルについて。

viewportごとのスクリーンショットです。

Sitespeed.ioではPhantomJSを使ってWebサイトにアクセスしたりスクリーンショットを撮ったり、YSlowを使って細かな測定を行ったり、BrowserTimeを使って時間を計測するなど外部のソフトウェアを多彩に組み合わせてWebサイトパフォーマンスを計測しています。そういったライブラリの使い方として見ても面白いソフトウェアです。 Sitespeed.ioはWindows/Mac OSX/Linux用のオープンソース・ソフトウェア(Apache License 2.0)です。 Sitespeed.io - Analyze your website speed and performance Summary of the sitespeed.io result - http://www.cybercom.com sitespeedio/sitespeed.io