| Commit-Queue | +1 |
I'll refine SoftNavigationRecorder some more while adding support for prerender and bfcache (will do stacked cls for that), but figure it's good to send out what I have now so it's not a huge pile at once.
// These are the high bounds of each bucket, in enum order. The index into this
// array is cast to an enum value when recording UKM. These should correspond to
// the upper bounds of the BitsPerPixelExponential enum in
// //tools/metrics/histograms/enums.xml.
static const double kLCPEntropyBucketThresholds[] = {
0.0, 0.00001, 0.0001, 0.001, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07,
0.08, 0.09, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,
1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 20.0,
30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 1000.0, 10000.0};
int64_t CalculateLCPEntropyBucket(double bpp) {
return std::lower_bound(std::begin(kLCPEntropyBucketThresholds),
std::end(kLCPEntropyBucketThresholds), bpp) -
std::begin(kLCPEntropyBucketThresholds);
}I moved this routine to page_load_metrics_util.{h,cc} so it can be shared between soft navigation recorder and this observer.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Johannes Henkel abandoned this change.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |