webtimer (GitHub) is a tool to time download times of web resources of a URL, and summarize by types.

For example:


$ webtimer.py https://pypi.python.org/pypi/webtimer
Measuring 1 of 1 100.00%: https://pypi.python.org/pypi/webtimer
Measuring 2 of 12 16.67%: /static/styles/screen-switcher-default.css
[snip]
Measuring 11 of 12 91.67%: /static/images/trans.gif
Measuring 12 of 12 100.00%: /static/images/python-logo.png
--------------------------------------------------------------------------------
Download times by URL:
1.01 https://pypi.python.org/pypi/webtimer
1.12 http://pypi.python.org/static/images/trans.gif
[snip]
1.32 http://pypi.python.org/static/styles/largestyles.css
1.38 http://pypi.python.org/static/styles/defaultfonts.css
--------------------------------------------------------------------------------
Download times by asset type:
1.01 7.09% HTML
2.28 16.04% Image
10.92 76.87% CSS
--------------------------------------------------------------------------------
Total download seconds: 14.20

And one for this blog:


$ webtimer.py https://yjlv.blogspot.com
Measuring 1 of 1 100.00%: https://yjlv.blogspot.com
Measuring 2 of 5 40.00%: //ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
Measuring 3 of 5 60.00%: http://aFarkas.github.com/html5shiv/dist/html5shiv.js
Measuring 4 of 5 80.00%: https://www.blogger.com/dyn-css/authorization.css?targetBlog
Measuring 5 of 5 100.00%: https://www.blogger.com/static/v1/widgets/3841957138-widget_
--------------------------------------------------------------------------------
Download times by URL:
0.17 http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
0.18 https://www.blogger.com/static/v1/widgets/3841957138-widget_css_bundle.css
0.32 [snip]
0.75 https://yjlv.blogspot.com
1.33 http://aFarkas.github.com/html5shiv/dist/html5shiv.js
--------------------------------------------------------------------------------
Download times by asset type:
0.50 18.13% CSS
0.75 27.22% HTML
1.50 54.65% Javascript
--------------------------------------------------------------------------------
Total download seconds: 2.75

I immediately could spot a caveat, not really a bug, you can see the HTML5 Shiv in the list, but that would only apply to Internet Explorer browser and only for version less than 9. But that is just a minor thing, just be aware when reading the results.

The output report was needed for some works, aligning, trimming, there was no need to giving below milliseconds, even tenths of second is more than accurate for this type of report. So I contributed a commit for those. If I want to prettify this furthermore, I would add a bar chart, but that’s really not necessary, percentage would do just fine.

webtimer is written by Chris Spencer under the GNU LGPLv3 License, requires fake-useragent, currently version 0.0.2 (2014-03-30).