summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing/safe_browsing_service.cc
diff options
context:
space:
mode:
authorpaulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 00:40:47 +0000
committerpaulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 00:40:47 +0000
commit2257382f96e5eb8ffaf06bdad3fa003e9c3dcc87 (patch)
treee6833d3d3f4d8c523ee12885e28153639352da23 /chrome/browser/safe_browsing/safe_browsing_service.cc
parent3573f0a032dbc64836263a8ae61995ec752532c2 (diff)
downloadchromium_src-2257382f96e5eb8ffaf06bdad3fa003e9c3dcc87.zip
chromium_src-2257382f96e5eb8ffaf06bdad3fa003e9c3dcc87.tar.gz
chromium_src-2257382f96e5eb8ffaf06bdad3fa003e9c3dcc87.tar.bz2
Add histograms to measure new SafeBrowsing performance.
Review URL: http://codereview.chromium.org/10712 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5423 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_service.cc')
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index c09806d..a2c62a2 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -202,9 +202,13 @@ bool SafeBrowsingService::CheckUrlNew(const GURL& url, Client* client) {
std::string list;
std::vector<SBPrefix> prefix_hits;
std::vector<SBFullHashResult> full_hits;
+ base::Time check_start = base::Time::Now();
bool prefix_match = database_->ContainsUrl(url, &list, &prefix_hits,
&full_hits,
protocol_manager_->last_update());
+
+ UMA_HISTOGRAM_TIMES(L"SB2.FilterCheck", base::Time::Now() - check_start);
+
if (!prefix_match)
return true; // URL is okay.
@@ -406,8 +410,12 @@ void SafeBrowsingService::HandleGetHashResults(
DCHECK(enabled_);
+ if (new_safe_browsing_)
+ UMA_HISTOGRAM_LONG_TIMES(L"SB2.Network", Time::Now() - check->start);
+ else
+ UMA_HISTOGRAM_LONG_TIMES(L"SB.Network", Time::Now() - check->start);
+
std::vector<SBPrefix> prefixes = check->prefix_hits;
- UMA_HISTOGRAM_LONG_TIMES(L"SB.Network", Time::Now() - check->start);
OnHandleGetHashResults(check, full_hashes); // 'check' is deleted here.
if (can_cache) {