Skip to content

Configuring Page Speed Online API

Sergey Chernyshev edited this page Mar 6, 2016 · 1 revision

The easiest way to set up [automated performance testing](Main Page#Automated_testing) is to use Google Page Speed Online API.

You can use simple shell script bundled with ShowSlow to schedule it using cron.

Getting the key

Get your Google Web Services API key

Open your config.php file and set $pageSpeedOnlineAPIKey variable.

$pageSpeedOnlineAPIKey = '<your-code-goes-here>';

Running the tests

To send API calls and import metrics into ShowSlow, just use your favorite tool to open beacon URL:

<showslow_base>/beacon/pagespeed/?api&u=<url-you-are-testing>

You can do that periodically using a cron-job, but keep in mind API call limits on the API.