How Code Execution Monitoring metrics are calculated and presented in the dashboard.
Inspector offers several ways to view aggregate data: Execution time, Memory usage, Performance distribution. What do they do, and how should you use?
Data aggregation is when multiple values are grouped together to give a single summary value. This is especially useful when you want to extract simple but meaningful values from Code Execution Monitoring data that consists of thousands or millions of measurements.
These metrics are calculated using the 75th percentile. It is the value where 75% of all measurements are under it, and 25% of measurements are over it. It is the percentile that Google recommends using when monitoring Web Vitals.
The chart above shows the page load histogram with all of the measurements below the 75th percentile coloured in blue.
The 75th percentile is a good balance of representing the vast majority of measurements, and not being impacted by outliers. While not as stable as the median (50th pecentile), the 75th percentile is a good choice for seeing medium- to long-term trends. We also think the 75th percentile is the best value to use when setting performance budgets.
For each transaction in your monitoring dashboard, individual measurements can be represented by a frequency distribution on a histogram chart.
That's a fancy way of describing a bar chart where the X (horizontal) axis shows the value of a measurement and the Y (vertical) axis shows the number of measurements that had that value. Take this chart for example:
Performance Distribution Chart
The chart above shows clusters of execution times on the X axis. The height of the bars represents how many measurements had execution times that fell within each cluster. We can see that the majority of execution times were between 0 and 407 milliseconds, with a smaller number of execution times on either side.
Notice how there are many clusters to the right of the chart, but they all have a small number of measurements? This is called the "long tail" and represents the times the transaction had the worst performances.