-
Notifications
You must be signed in to change notification settings - Fork 61
Architecture
Browser perf is used to collect performance metrics from web pages or hybrid (cordova like) applications for specific scenarios. It measures the metrics that are obtained from various probes activated on a page when actions are performed on the page.
Browser-perf measures performance metrics. A Metric is a quantifiable number that can be used to get an idea of how well the website or a hybrid app is performing. Examples of metrics include
- mean time for each frame when Scrolling
- average area that is redrawn on the screen
- Number of layout or paint operations that take more than 16ms (1/60th on a second, for the 60fps rate)
- the rate of memory increase during a checkout activity. These metrics are actionable and much more useful that raw data like individual paint or layout times.
Probes are data points collected from browser when an action is performed. The raw data from the probe is converted to Metrics. These are events collected from various sources like Chrome Timeline graph, about:tracing
, xperf
or frequency of events like request animation frame.
Interactions like scroll, clicks, etc. are performed on the page. These actions are defined using the Selenium Web driver wd module. The actions can be simple things like clicking on buttons, scrolling down the page, or can be complex tasks like a merchant checkout workflow.
- Load URL.
- Setup Metrics - eg. initialize counters.
- Setup Probes - eg. add command line flags to browser, reset logs.
- Start Metrics - Start the counter
- Start Probes -
- Perform Actions - eg. scroll, checkout workflow - selenium commands.
- As actions are performed, Probes emit data to Metrics
- Actions end
- Probes teardown - eg. close connections, read final logs
- Metrics teardown - eg. calculate statistics from raw data
- Get results from all metrics