Chapter 27. A Simple Way to Measure Website Performance

Pavel Paulau

Not so long ago, folks from Neustar demonstrated at Velocity Conference the possibility of effective client-side performance testing using only free, open-source solutions. They introduced bundle of tools, such as Selenium and BrowserMob Proxy. The first one is intended to automate emulation of user interactions, the second one is a good for metric capturing. That was really inspiring presentation.

The greatest feature of their approach was the fact that all performance data are consolidated into a single container—HTTP Archive (HAR). It makes further processing of test results more controlled and predictable due to strict format standardization.

However, there were no advanced tools for dealing with HAR files at that moment. HAR Viewer is wonderful but not suitable for common testing workflow. ShowSlow is instead a perfect example of a repository for automated performance measurement. Unfortunately, handling of HAR files is not the strongest trait of it. So a new project HAR Storage (http://code.google.com/p/harstorage/) appeared.

Concept

The testing process is rather straightforward. All you need is to create a Selenium script that describes common user actions. Then you arm your script with methods to control a proxy server via its API. It not only means capturing and storing streams of HTTP requests, but also customization of network characteristics (e.g., bandwidth and latency) and traffic filtering. The last ...

Get Web Performance Daybook Volume 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.