Download page Modify Resource Sampling Options.
Modify Resource Sampling Options
- How the resources are ordered (the sampling algorithm used)
- The maximum number of resources to be evaluated
Both of these factors can be modified.
To modify the sampling algorithm, use
resTiming.sampler. Possible values are:
- Top N: the resources that take the most time to load, up to the maximum number
- First N: the resources that load first, up to the maximum number
- Relevant N: the resources that are deemed "most relevant" by an algorithm that takes into account both overall load time and when in the sequence the resource loads. So, for example, something that takes a long time to load and is early in the load sequence is "more relevant" than something that takes exactly the same time to load, but does so later in the sequence, on the assumption that the former would have more impact on the overall user experience. This is the default.
To modify the maximum number of resources to be evaluated, use
For example, to sample based on Top N and to set the max number at 100, you could add the following snippet to your page, before you inject the