Bug 205281

Summary: Only report prevalent domains in the ResourceLoadStatistics data summary API
Product: WebKit Reporter: Kate Cheney <katherine_cheney>
Component: WebKit Misc.Assignee: Kate Cheney <katherine_cheney>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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.