Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(507)

Issue 23734006: Add histograms to ResourceFetcher to measure memory cache hit rate. (Closed)

Created:
7 years, 3 months ago by Philippe
Modified:
7 years, 3 months ago
Reviewers:
abarth-chromium
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Add histograms to ResourceFetcher to measure memory cache hit rate. This will drive possible improvements that could be made in the cache to decrease memory usage (at least on Android). Note that the metrics are in the ResourceFetcher rather than in the MemoryCache itself to only report events that really matter in practice (e.g. the resource has to be fetched from the browser process vs. the resource was served directly from the in-memory cache). In addition to the overall hit rate, an important metric that this CL is adding is whether a resource is live or dead upon a cache hit. This will help us understand whether memory usage improvements can be made in the cache since only dead resources can be evicted (live resources are used by clients thus can't be deleted by definition). BUG=290193 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=157890

Patch Set 1 : #

Total comments: 15

Patch Set 2 : Address Adam's comments #

Patch Set 3 : Fix clang build (by adding missing switch case) #

Total comments: 6

Patch Set 4 : Address Adam's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -4 lines) Patch
M Source/core/fetch/Resource.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/fetch/ResourceFetcher.cpp View 1 2 3 9 chunks +39 lines, -3 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Philippe
7 years, 3 months ago (2013-09-13 10:27:15 UTC) #1
Philippe
Hi Adam, I would like to add these metrics to understand the current performance characteristics ...
7 years, 3 months ago (2013-09-13 11:38:26 UTC) #2
abarth-chromium
Looks fine. Several minor comments below. I'd like to see one more iteration before landing. ...
7 years, 3 months ago (2013-09-13 17:38:18 UTC) #3
Philippe
Thanks Adam! https://codereview.chromium.org/23734006/diff/5001/Source/core/fetch/Resource.h File Source/core/fetch/Resource.h (right): https://codereview.chromium.org/23734006/diff/5001/Source/core/fetch/Resource.h#newcode61 Source/core/fetch/Resource.h:61: MainResource = 0, On 2013/09/13 17:38:18, abarth ...
7 years, 3 months ago (2013-09-16 11:47:21 UTC) #4
Philippe
https://codereview.chromium.org/23734006/diff/5001/Source/core/fetch/ResourceFetcher.cpp File Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/23734006/diff/5001/Source/core/fetch/ResourceFetcher.cpp#newcode113 Source/core/fetch/ResourceFetcher.cpp:113: } On 2013/09/16 11:47:21, Philippe wrote: > On 2013/09/13 ...
7 years, 3 months ago (2013-09-16 14:09:08 UTC) #5
abarth-chromium
I'm sad that this is making the code a bit uglier, but the alternatives appear ...
7 years, 3 months ago (2013-09-16 21:04:35 UTC) #6
Philippe
Thanks Adam! https://codereview.chromium.org/23734006/diff/18001/Source/core/fetch/Resource.h File Source/core/fetch/Resource.h (right): https://codereview.chromium.org/23734006/diff/18001/Source/core/fetch/Resource.h#newcode74 Source/core/fetch/Resource.h:74: NumberOfTypes = 13, On 2013/09/16 21:04:35, abarth ...
7 years, 3 months ago (2013-09-17 08:37:50 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pliard@chromium.org/23734006/25001
7 years, 3 months ago (2013-09-17 08:38:08 UTC) #8
commit-bot: I haz the power
7 years, 3 months ago (2013-09-17 09:38:54 UTC) #9
Message was sent while issue was closed.
Change committed as 157890

Powered by Google App Engine
This is Rietveld 408576698