the Chromium logo

The Chromium Projects

Benchmarks == Measurements + Page Set

Overview

Telemetry is opinionated in what a benchmark is. A benchmark is:

Here's why you care:

Check out tools/perf/page_sets/top_25 for examples of page sets.

## An Example

Lets say my users often go to a specific page, click a button, and ==scroll== a div that shows up. I could measure any number of things:

Those are measurements. tools/perf has many measurements. THINK TWICE BEFORE YOU WRITE ANOTHER MEASUREMENT. There probably is one already.

Most telemetry users should be putting their effort into writing page sets. In this example, the page set isn't going to be "the page set for measuring this specific url and how well it scrolls." Its going to be "the page sets for my application," and since I have only one use case right now, it will be:

{description: "my teams pages that are worth benchmarking",

pages: [

{

"url": "my page's url",

"smoothness": [

{action: click_element, selector: "#show-dialog"},

{action: scroll, selector: "#dialog > #dialog-contents"}

]

}

}

Now if I wanted to measure the smoothness of this use case:

./tools/perf/run_multipage_benchmark smoothness_benchmark my_team.json

Suppose now you also want to test the perf of your main page without that dialog showing. Ugh, write another benchmark? Not so much... just add another page:

{

"url": "my page's url",

"smoothness": [

{action: scroll, selector: "body"}

]

}

And maybe I want to monitor memory for that page, by clicking a compose button 10 times. Again, thats not a benchmark, its just another entry in yoru page.

{

"url": "my page's url",

"smoothness": [

{action: scroll, selector: "body"}

],

"stress_memory": [

{action: repeat, times: 10,

repeat: [

{"action": click_element, selector: compose},

{"action": "click_element", selector: "#discard"}

]

]

}

Voila. Now we just:

./tools/perf/run_multipage_benchmark memory_benchmark my_team.json