Bug 175348 - Resource Load Statistics: Merge of dataRecordsRemoved should use std::max()
Summary: Resource Load Statistics: Merge of dataRecordsRemoved should use std::max()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: John Wilander
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-08-08 15:18 PDT by John Wilander
Modified: 2017-08-08 17:04 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.44 KB, patch)
2017-08-08 15:29 PDT, John Wilander
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Wilander 2017-08-08 15:18:15 PDT
When we merge dataRecordsRemoved from two different sources we should not add them since that may create a bounce back and forth that inflates the number. Note that this statistic does not affect classification.

std::max() is not correct either but closer to correct, especially in real life. A correct solution probably requires keeping separate track of deltas.
Comment 1 Radar WebKit Bug Importer 2017-08-08 15:18:44 PDT
<rdar://problem/33785695>
Comment 2 John Wilander 2017-08-08 15:29:39 PDT
Created attachment 317629 [details]
Patch
Comment 3 Chris Dumez 2017-08-08 16:30:43 PDT
Comment on attachment 317629 [details]
Patch

r=me
Comment 4 John Wilander 2017-08-08 16:33:52 PDT
Comment on attachment 317629 [details]
Patch

Thx!
Comment 5 WebKit Commit Bot 2017-08-08 17:03:59 PDT
Comment on attachment 317629 [details]
Patch

Clearing flags on attachment: 317629

Committed r220430: <http://trac.webkit.org/changeset/220430>
Comment 6 WebKit Commit Bot 2017-08-08 17:04:02 PDT
All reviewed patches have been landed.  Closing bug.