From c7593fb293c58ccb4bcd290d476e9e03d82c2934 Mon Sep 17 00:00:00 2001 From: "erikwright@chromium.org" Date: Mon, 14 Nov 2011 23:54:27 +0000 Subject: Add/change metrics for cookie store loading: Cookie.TimeLoad (previously the total time the IO thread was busy loading cookies) is now the sum of all DB-thread tasks for loading cookies. Cookie.TimeBlockedOnLoad is the time between the IO thread requesting cookies to load and them finally being loaded. Cookie.PriorityBlockingTime is the amount of time that there were one or more web requests waiting on cookies to load. Cookie.PriorityLoadCount is the number of priority loads that occurred (i.e., different domains that were requested before the cookie store was fully loaded). BUG=68657 TEST= Review URL: http://codereview.chromium.org/8537016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109981 0039d316-1c4b-4281-b951-d872f2087c98 --- net/base/cookie_monster.cc | 5 +++-- net/base/cookie_monster.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'net') diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc index 519e5f6..c2ac435 100644 --- a/net/base/cookie_monster.cc +++ b/net/base/cookie_monster.cc @@ -1497,7 +1497,7 @@ void CookieMonster::InitStore() { void CookieMonster::OnLoaded(TimeTicks beginning_time, const std::vector& cookies) { StoreLoadedCookies(cookies); - histogram_time_load_->AddTime(TimeTicks::Now() - beginning_time); + histogram_time_blocked_on_load_->AddTime(TimeTicks::Now() - beginning_time); // Invoke the task queue of cookie request. InvokeQueue(); @@ -2298,7 +2298,8 @@ void CookieMonster::InitializeHistograms() { histogram_time_mac_ = base::Histogram::FactoryTimeGet("Cookie.TimeGetMac", base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(1), 50, base::Histogram::kUmaTargetedHistogramFlag); - histogram_time_load_ = base::Histogram::FactoryTimeGet("Cookie.TimeLoad", + histogram_time_blocked_on_load_ = base::Histogram::FactoryTimeGet( + "Cookie.TimeBlockedOnLoad", base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(1), 50, base::Histogram::kUmaTargetedHistogramFlag); } diff --git a/net/base/cookie_monster.h b/net/base/cookie_monster.h index 9e2c1e8..d8874dc 100644 --- a/net/base/cookie_monster.h +++ b/net/base/cookie_monster.h @@ -462,7 +462,7 @@ class NET_EXPORT CookieMonster : public CookieStore { // Stores cookies loaded from the backing store and invokes any deferred // calls. |beginning_time| should be the moment PersistentCookieStore::Load - // was invoked and is used for reporting histogram_time_load_. + // was invoked and is used for reporting histogram_time_blocked_on_load_. // See PersistentCookieStore::Load for details on the contents of cookies. void OnLoaded(base::TimeTicks beginning_time, const std::vector& cookies); @@ -613,7 +613,7 @@ class NET_EXPORT CookieMonster : public CookieStore { base::Histogram* histogram_cookie_deletion_cause_; base::Histogram* histogram_time_get_; base::Histogram* histogram_time_mac_; - base::Histogram* histogram_time_load_; + base::Histogram* histogram_time_blocked_on_load_; CookieMap cookies_; -- cgit v1.1