Showing results for 
Search instead for 
Did you mean: 

Stingray PageSpeed - measuring page load time


Stingray PageSpeed - measuring page load time

Stingray PageSpeed is a small tool to help you measure page load times for visitors to your site. The PageSpeed system records the time when a client requests an initial page; and then again when the last object is requested. The delta is then recorded as the total load time for the page. This page load time is a great metric for measuring real world performance because it records the entire rendering time. This can be affected by things like round trip time and window scaling at the network level, right up to JavaScript and CSS processing at the application layer.

For example: with Stingray PageSpeed enabled you can now measure the effects of increasing the initial congestion window on your Ethernet interface, or see the improvements made by enabling Aptimizer on your website:


So How does PageSpeed Work?

PageSpeed works by injecting a little bit of Javascript into the pages which we are monitoring. This Javascript adds an extra object to the page; a simple blank.gif file. We record the time when the page is hit and again when the blank.gif is requested. The Javascript ensures that the blank.gif file is loaded at the very last moment, thus ensuring that we record the entire rendering time.

I have tried to make this JavaScript as unobtrusive as possible, but I would still recommend that you test that it doesn't have any adverse effects before deploying it on your LIVE web site.

This information can then be pushed out to a log file or other event target via the alerting system, or simply viewed in the PageSpeed UI:

Screen Shot 2013-02-14 at 06.35.51.png

Deploying PageSpeed on Stingray

To deploy PageSpeed on your Traffic Manager you will need to upload the components contained in the partial backup. If you are running Stingray 8.1 then you should be able to import the backup directly in the Stingray admin UI. If not you can upload/copy the files to your Traffic Manager manually. PageSpeed consists of the following configuration items:

    • rules/PageSpeedResponse
    • extra/psmap.html
    • extra/psdata.html
    • extra/blank.gif
    • events/PageSpeed
    • action/PageSpeedLog

The two rules are the TrafficScript rules and these will need to be enabled as a request and response rule on the Virtual Server for which you want to enable PageSpeed.

The extra files should be uploaded to the extra files catalog. The psmap.html and psdata.html are html templates for the PageSpeed UI, and the blank.gif is the blank which terminates the rendering measurement.

The events/action files enable PageSpeed to log to a simple logfile via the Stingray alerting system.

Configuring PageSpeed

The PageSpeed configuration is held in the PageSpeedRequest TrafficScript rule. There are a number of parameters which need to be set:




The pages to track

“/”, “/index.html”



Modify Cache header




Enable logging via PageSpeed event target




Enable debugging




Enable the PageSpeed UI




The userSmiley Tongueassword for HTTP Basic Auth in PageSpeed UI

StingraySmiley TongueageSpeed



max requests to show in UI


$maxGreen, $maxRed, $maxAmber


Set the colouring on the PageSpeed map page


$dclat, $dclon


The lat and lon of the DCs

52.204, 0.125



DemoMode enables spoofing in the rule and adds artificial delay to requests based on proximity to the DC.




KM/Second used for artificial delay in demoMode




Refresh period for map page in the UI




Use Google maps in the UI?




Supply a bing API key if you want to use Bing maps in the PageSpeed UI


The most important setting is the “pages” hash, which should be set with the list of pages on your site which you want to track. You should also change the password for the PageSpeed UI if you keep it enabled, and obviously demoMode should be set to false on all production TrafficManagers.

Accessing the PageSpeed UI

Finally. To access the PageSpeed map and data pages, simply point your browser at: http://<yoursite>/PageSpeed/UI