Bug 205281 - Only report prevalent domains in the ResourceLoadStatistics data summary API
Summary: Only report prevalent domains in the ResourceLoadStatistics data summary API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kate Cheney
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-12-16 10:16 PST by Kate Cheney
Modified: 2019-12-18 11:02 PST (History)
4 users (show)

See Also:


Attachments
Patch (22.54 KB, patch)
2019-12-16 16:58 PST, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch (24.46 KB, patch)
2019-12-16 17:42 PST, Kate Cheney
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kate Cheney 2019-12-16 10:16:23 PST
Only prevalent resources should be aggregated for the ResourceLoadStatistics data summary
Comment 1 Radar WebKit Bug Importer 2019-12-16 10:17:01 PST
<rdar://problem/57975017>
Comment 2 Kate Cheney 2019-12-16 16:58:18 PST
Created attachment 385833 [details]
Patch
Comment 3 Kate Cheney 2019-12-16 17:42:18 PST
Created attachment 385840 [details]
Patch
Comment 4 Kate Cheney 2019-12-16 17:42:34 PST
Fixed failing api test.
Comment 5 Brent Fulgham 2019-12-18 09:41:52 PST
Comment on attachment 385840 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=385840&action=review

> LayoutTests/http/tests/resourceLoadStatistics/aggregate-sorted-data-no-storage-access-database-expected.txt:16
> +    isPrevalentResource: Yes

Can you confirm we have some tests that verify things are not prevalent if they are beneath the thresholds? I think this is true, but have not checked myself.

> LayoutTests/http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker-database-expected.txt:-29
> -Third Party Registrable Domain: localhost

Are these changes because we are no longer returning non-prevelant resources in the ITP data returned by the new API?
Comment 6 Kate Cheney 2019-12-18 09:51:11 PST
Comment on attachment 385840 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=385840&action=review

>> LayoutTests/http/tests/resourceLoadStatistics/aggregate-sorted-data-no-storage-access-database-expected.txt:16
>> +    isPrevalentResource: Yes
> 
> Can you confirm we have some tests that verify things are not prevalent if they are beneath the thresholds? I think this is true, but have not checked myself.

Yes, this is tested in all of the http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on* tests.

>> LayoutTests/http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker-database-expected.txt:-29
>> -Third Party Registrable Domain: localhost
> 
> Are these changes because we are no longer returning non-prevelant resources in the ITP data returned by the new API?

Yes. These tests were never meant to test the ITP data summary, it was just a product of them calling the dumpResourceLoadStatistics function. Now that only prevalent resources are included in the data, the ITP data summary for these non-prevalent domains is empty so they won't report it.
Comment 7 WebKit Commit Bot 2019-12-18 11:02:51 PST
Comment on attachment 385840 [details]
Patch

Clearing flags on attachment: 385840

Committed r253697: <https://trac.webkit.org/changeset/253697>
Comment 8 WebKit Commit Bot 2019-12-18 11:02:52 PST
All reviewed patches have been landed.  Closing bug.