sandwich: 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 Review-Url: https://codereview.chromium.org/2134763002 Cr-Commit-Position: refs/heads/master@{#404626}
Showing
Please register or sign in to comment