Installation and configuration
From ShowSlow
Getting the code
Download
Download latest version from here: http://code.google.com/p/showslow/downloads/list
From Subversion
Simply check out the code:
svn checkout http://showslow.googlecode.com/svn/trunk/ showslow
Apache configuration
As part of "Fast by default" movement, starting with version 0.6, Show Slow comes with drop-in .htaccess file that increases performance of the application (Show Slow uses SVN Assets for asset versioning to avoid caching problems).
In order for it to work, you need to make sure that mod_deflate, mod_rewrite and mod_expires Apache modules are on your site (contact your internet provider if you don't know what to do).
Nginx configuration
If you're using nginx instead of Apache, check out sample configuration file in SVN-Assets repository: http://code.google.com/p/svn-assets/source/browse/trunk/nginx.config_sample
Other web servers might have similar functionality. Please post your samples if you're going to configure them.
Database setup
Create tables in your database from tables.sql and update config.php with database name, user and password.
You can use a tool like phpMyAdmin if you have it installed or just use a command like mysql client:
$ mysql -u root -p
mysql> create database showslow;
mysql> grant usage on showslow.* to showslowuser@localhost identified by '... database-password ...';
mysql> grant all privileges on showslow.* to showslowuser@localhost;
mysql> source tables.sql
mysql> show tables;
+-----------------------+
| Tables_in_showslow |
+-----------------------+
| db_version |
| dynatrace |
| event |
| har |
| metric |
| pagespeed |
| u_googlefriendconnect |
| u_invitation |
| u_users |
| urls |
| user_urls |
| yslow2 |
+-----------------------+
12 rows in set (0.00 sec)
mysql> quit
Configuration
Copy config.sample.php to config.php and change variables for your setup.
Installation paths
$showslow_root = '/path/to/showslow/root/'; $showslow_base = 'http://www.example.com/showslow/'; # don't forget the trailing slash
Database connection information
$db = 'showslow'; $user = 'showslowuser'; $pass = '... database-password ...'; $host = 'localhost';
Connecting using local socket
$db = 'showslow'; $user = 'showslowuser'; $pass = '... database-password ...'; $host = 'localhost:/var/lib/mysql/mysql.sock';
Graph smoothing
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;
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:
$webPageTestBase = 'http://www.webpagetest.org/';
$webPageTestLocations = array(
'DSL' => 'Dulles, VA (IE7, DSL)',
'FIOS' => 'Dulles, VA (IE7, FIOS)',
'Dial' => 'Dulles, VA (IE7, 56Kbps dial-up)',
'IE8' => 'Dulles, VA (IE8, DSL)',
'SanJose' => 'San Jose, CA (IE8, Ethernet)',
'NZ' => 'Wellington, New Zealand (IE7, DSL)',
'UK' => 'Gloucester, UK (IE7, DSL)'
);
$webPageTestPrivateByDefault = false;
$webPageTestFirstRunOnlyByDefault = false;
If you wish to disable this integration, set $webPageTestBase = null
Caching for static assets using SVN Assets
ShowSlow is very serious about it's 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.
You have to configure SVN Assets by setting $baseAssetURL variable to point at the root of the site (some instances use different domain for sharding and better caching). You might also need to enable mod_rewrite, mod_expires and mod_deflate apache modules in order for it to work.
If you're upgrading from previous version, please make sure you check config.sample.php and add
$baseAssetURL = $showslow_base;
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 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 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/');

