summaryrefslogtreecommitdiffstats
path: root/chrome/browser/metrics
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-12 16:52:10 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-12 16:52:10 +0000
commitf88ba61a8133ced5acb6d1f5a8df69d149cc42fd (patch)
treec08930ee7a2ef3b8aeab3e082cee13596371f976 /chrome/browser/metrics
parent7a38db66bdb64203e1322d777c7384cacd384496 (diff)
downloadchromium_src-f88ba61a8133ced5acb6d1f5a8df69d149cc42fd.zip
chromium_src-f88ba61a8133ced5acb6d1f5a8df69d149cc42fd.tar.gz
chromium_src-f88ba61a8133ced5acb6d1f5a8df69d149cc42fd.tar.bz2
Add back in log info about histogram hashes
This was seemingly inadvertently deleted in a CL http://src.chromium.org/viewvc/chrome?view=rev&revision=16023 The change should have no semantic impact on the running of the program (unless the user enables logging), and it helps me isolate actual names of histograms for unknown hashes that appear on the histogram dashboard. r=evanm,dpranke Review URL: http://codereview.chromium.org/125011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18280 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metrics')
-rw-r--r--chrome/browser/metrics/metrics_log.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc
index 7d81bce..2d00123 100644
--- a/chrome/browser/metrics/metrics_log.cc
+++ b/chrome/browser/metrics/metrics_log.cc
@@ -112,6 +112,14 @@ std::string MetricsLog::CreateHash(const std::string& value) {
DCHECK(arraysize(digest.a) >= arraysize(reverse));
for (size_t i = 0; i < arraysize(reverse); ++i)
reverse[i] = digest.a[arraysize(reverse) - i - 1];
+ // The following log is VERY helpful when folks add some named histogram into
+ // the code, but forgot to update the descriptive list of histograms. When
+ // that happens, all we get to see (server side) is a hash of the histogram
+ // name. We can then use this logging to find out what histogram name was
+ // being hashed to a given MD5 value by just running the version of Chromium
+ // in question with --enable-logging.
+ LOG(INFO) << "Metrics: Hash numeric [" << value << "]=["
+ << *reinterpret_cast<const uint64*>(&reverse[0]) << "]";
return std::string(reinterpret_cast<char*>(digest.a), arraysize(digest.a));
}