ChangesThe changes in this release are all statistical, and related to the data I've collected while running the test.
- Switch from the geometric mean to the arithmetic mean, because data for a single user is more or less centrally clustered.
This is not true across users, but for readings for a single user (single connection actually), I've found that the data does not really have outliers.
- Instead of downloading all images on every run, use the first run as a pilot test, and based on the results from that run, only download the 3 largest images that can be downloaded for this user.
This allows us to download fewer bytes, and get more consistent results across runs.
- Add random sampling. In previous versions, the test would be run for every page view. By adding random sampling, we now only run it on a percentage of page views.
You can now set
PERFORMANCE.BWTest.sampleto a number between 0 and 100, and that's the percentage of page views that will be tested for bandwidth. Note that this is not an integer, so you can set it to 0.1 or 10.25, or anything as long as it's between 0 and 100 (both inclusive). Setting it to 0 means that the test isn't run for anyone, so you probably don't want that, and 100 means that the test is run for everybody. This is also the default.
- Fire an onload event when the script completes loading. This is mainly so that you can asynchronously load the script so that it does not affect your page load time. Instead of checking for script.onload or onreadystatechange, you can just implement the