Descriptionsandwich: Fixes a bug when served from cache request are before.
Before, prefetch experiment's CSV collection was maintaining a dict
of transfered bytes per URLs as it was iterating over all resource
requests and served from memory cache URLs request would just grabe
the size from this dictionary. But we may have requests served from
memory cache before original request that filled the memory cache,
leading to a KeyError.
This CL fixes this issue by first building the dictionary by going
over resources requests, and then actually sum the bytes using this
dictionary, avoiding the KeyError.
BUG=582080
Committed: https://crrev.com/866025e8432bd4a23c221189be36696113e87c32
Cr-Commit-Position: refs/heads/master@{#404626}
Patch Set 1 #Patch Set 2 : Rebase for landing #Messages
Total messages: 17 (8 generated)
|