Documentation / Metrics


Collected metrics collects a lot of metrics which are filtered before they are sent to Graphite. You can remove filters and/or add your own filters. Some sensible defaults have been set for you, if you have suggestions to change them create an issue at Github.

Summary vs pageSummary

We group the metrics in two different groups: pageSummary encapsulates the metrics for a single page. For example if we test a single page 10 times, it will have the min/median/max here for values that change.

The summary holds information per group, or specifically per domain. If you test ten different pages on a site (same domain), the summary of those metrics will end up here.

List configured metrics

You can list the metrics that are configured by --metrics.filterList. The list is dependent on which plugins you are loading, so you need to do an actual run to generate the list. The list is stored in the data folder in a file named configuredMetrics.txt.

$ --metrics.filterList

The file will look something like this:


List metrics

You can also list all possible metrics that you can send. You can do that by using --metrics.list. It will generate a text file named metrics.txt in the data folder.

$ --metrics.list

Configure/filter metrics

You can add/change/remove filters with --metrics.filter.

Add a metric

If you want to add metrics, start by looking at the generated metrics file, so you can see what you would send.

Say you want to send all performance advice to Graphite for a page. Checking the file you should see them. It will look something like this:


The score is … yes the score and the weight is how important it is. You probably only need the score, so setting a filter like this coach.pageSummary.advice.performance.adviceList.*.score will send them all (setting a wildcard for the name).

$ --metrics.filter coach.pageSummary.advice.performance.adviceList.*.score -n 1

The best way to test and verify on your local, is to checkout the project and then start a TCP server that logs everything:

$ tools/tcp-server.js
$ Server listening on :::52860

It will output the port, so use it when you run

$ --metrics.list -n 1 --metrics.filter coach.pageSummary.advice.performance.adviceList.*.score --graphite.port 52860

It will log all metrics you will send to Graphite.

Example: Add all Coach advice

By default the total score for performance, accessibility and bestpractice is configured to send to Graphite. And previously we looked at sending all the score for the performance advice. If you want to send all the scores for all different advice, you can do that too, by adding all the three categories in the CLI:

--metrics.filter coach.pageSummary.advice.performance.adviceList.*.score coach.pageSummary.advice.bestpractice.adviceList.*.score coach.pageSummary.advice.accessibility.adviceList.*.score

Example: Use JSON config to pass the metrics configuration

If you have a lot of different metrics that you want to send to Graphite the command line will be overloaded. But hey, there’s a solution to the problem: Use the JSON configuration option --config (read more here).

If you wanna send the three coach metrics, you can add them as a config file like this and pass the filename to the --config parameter:

  "metrics": {
    "filter": [

Remove metrics does not currently have support to remove single metrics, but you can remove all configured metrics with the parameter value *-

$ --metrics.list -n 1 --metrics.filter *- coach.pageSummary.advice.performance.adviceList.*.score --graphite.port 52860

will send only the coach.pageSummary.advice.performance.adviceList.*.score metrics.