Writing a good measurement is really hard. We already have a bunch of measurements in tools/perf/measurements for you to use. If you are looking to write a new benchmark, you probably just need to add or modify an existing story set and you might need to add new metrics to an existing measurement. Think twice before you write another measurement.
A measurement is a python class that obtains a set of Numbers about a Page. Measurements must work for all pages, not just one specific page.
For example, let’s 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:
These are all examples of measurements.
Timeline-Based Measurement is a new and preferred way for computing Telemetry metrics from traces in a unified manner. The code is contained in tools/telemetry/telemetry/web_perf.
For details about this approach, see the following documents: Why choose TimelineBasedMeasurement over other measurements?
Please email email@example.com with details about what you are trying to measure. We can help you get started and ensure that there are not existing measurements that you could use.