Advanced configuration options

From ShowSlow
Jump to: navigation, search

Contents

Configuration settings below are optional and defaults in the system are reasonable.

Basic configuration is enough to get started, but if you want to tweak your instance to your liking, we try to make things quite flexible - go ahead and get crazy with switches ;)

Running WebPageTest tests

Starting from version 0.6, you can now run tests using WebPageTest directly from details page.

You can configure this integration using following variables:

$webPageTestKey = '....';
$webPageTestBase = 'http://www.webpagetest.org/';
$webPageTestPrivateByDefault = false;
$webPageTestFirstRunOnlyByDefault = false;

All non-private results will be stored in database and listed at the bottom of the details pages. If you'd like to store private results as well, add this variable to config.php:

$keepPrivatePageTests = true;

API key

You must set an API key ($webPageTestKey). For the public instance of WebPageTest, you have to request it from Patrick Meenan.

If your private instance does not require a key, then just set it to some non-null value.

Commenting out $webPageTestKey definition (or setting it to null) will disable integration between the tools.

Custom metrics

For each custom metric you want to track, copy this block of code into config.php:

$metrics['bouncerate'] = array(
       'id' => 1,
       'title' => 'Bounce Rate (in %)',
       'color' => 'purple',
       'description' => 'Bounce rate measured by Google Analytics',
       'min' => 0,
       'max' => 100
);

YSlow profiles

Change it if you want to allow other profiles including your custom profiles

$YSlow2AllowedProfiles = array('ydefault');

Grouping URLs

You can group URLs to be displayed on URLs measured tab if you need to provide easy access to users for a subset of URLs.

You need to add entries like the following to the $URLGroups array in config file:

$URLGroups['showslow'] = array(
	'title' => "ShowSlow.com pages",
	'urls' => array(
		'http://www.showslow.com/'
	)
);
$URLGroups['sergeycheblog'] = array(
	'title' => "Sergey's blog",
	'urls' => array(
		'http://www.sergeychernyshev.com/blog/'
	)
);

URL prefixes provided will be used to filter the listing when link is clicked.

Limit URLs accepted

$limitURLs = array( 'http://www.yahoo.com/', 'http://www.google.com/' );

If is not false, then should be an array of prefix matches or PCRE regular expressions - if one of them matches, URL will be accepted.

Ignore URLs

By default Show Slow ignores URLs from private networks, but if you're testing some internal servers, you can remove some of these.

$ignoreURLs = array(
        'http://127.0.0.',
        'http://localhost/',
        'http://localhost:',
        'http://10.',
        'http://192.168.',
        'http://172.16.',
        'http://172.17.',
        'http://172.18.',
        'http://172.19.',
        'http://172.20.',
        'http://172.21.',
        'http://172.22.',
        'http://172.23.',
        'http://172.24.',
        'http://172.25.',
        'http://172.26.',
        'http://172.27.',
        'http://172.28.',
        'http://172.29.',
        'http://172.30.',
        'http://172.31.'
);

It's probably not a very good idea to remove 127.0.0.x simply because it can confuse the automation scripts when they'll be ordered to crawl local machine.

Drop query strings from URLs

You can configure ShowSlow to ignore query strings.

You can configure it for all URLs:

$dropQueryStrings = true;

or only for those matching one of the prefixes:

$dropQueryStrings = array( 'http://www.yahoo.com/', 'http://www.google.com/' );

Custom lists of URLs

You can create a group of URLs you want to be displayed on a separate page.

$customLists['alexa'] = array(
        'title' => 'Alexa Top 100',
        'description' => 'Most popular sites of the internet accorting to <a href="" target="_blank">Alexa Top 100</a>.',
        'hidden' => false,
        'urls' => array(
                "http://www.google.com/",
                "http://www.facebook.com/",
                "http://www.youtube.com/",
                "http://www.yahoo.com/",
                ...
        )
);

List will be automatically added to the menu, unless hidden attribute is set to true.

Custom timeplot instance location

If you're hosting SIMILE Timeplot library yourself, then you have to set this to the base URL.

$TimePlotBase = '/timeplot/';

Google Analytics

To see if your users are visiting the tool, enable Google Analytics (for publicly hosted instances).

$googleAnalyticsProfile = ;

ShowSlow feedback

If you'd like to show feedback button for ShowSlow project so your users can suggest new features or report bugs in ShowSlow, you can enable this button.

$showFeedbackButton = true;

Deleting old data

How old should data be for deletion (in days). Anything >0 will delete old data. Don't forget to add a cron job to run deleteolddata.php

$oldDataInterval = 60;

HAR support

ShowSlow now supports HAR beacon that can be used either manually or with a simple script that posts HAR file as a POST body. More importantly, beacons support is also added to Firebug's NetExport extension that allows saving complete contents of Net panel into a file, in this case, it'll send it to the server (by default it is configured to send to http://www.showslow.com/beacon/har/, but you can change configuration in about:config).

To enable HAR beacon, set

$enableHARBeacon = true;.

You can also install HAR Viewer locally and set $HARViewerBase to point at it's location.

Compare rankings

ShowSlow can compare YSlow and PageSpeed rankings over time for different URLs - you can see comparison page linked from Compare rankings tab on the home page.

You can optionally configure a list of URLs to compare by default when this tab is clicked - just set $defaultURLsToCompare to an array of URLs and this page will show the graph (granted that data for those URLs is collected).

Example:

$defaultURLsToCompare = array('http://www.google.com/', 'http://www.yahoo.com/', 'http://www.amazon.com/');

Graph smoothing

Only applies to Timeplot graphs

Graphs in ShowSlow are smoothed to avoid constant jumping back and forth for sites that have dynamic features and vary pages from test to test.

To configure the size of the sample for smoothing, you can tweak $smoothDistance variable:

$smoothDistance = 5;

Caching for static assets using SVN Assets

TODO: update when new asset version tool is implemented

ShowSlow is very serious about its own performance and all bugs in the system related to performance get high priority as minimum.

Starting with version 0.6, it uses SVN Assets library to enable asset caching.

By default root URL for static assets is the same as Show Slow base URL, but if you use different base hostname mapping for your static "CDN", you can configure SVN Assets by setting $baseAssetURL variable. You might also need to enable mod_rewrite, mod_expires and mod_deflate apache modules in order for it to work.

Allowing users to enter their URLs for monitoring

This variable enables user registrationa and adds "+add URL" tab to navigation

$enableMyURLs = true;
Personal tools