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

Unified Diff: base/metrics/sample_map.cc

Issue 2811713003: Embed a single sample in histogram metadata. (Closed)
Patch Set: addressed review comments by asvitkine Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/metrics/sample_map.cc
diff --git a/base/metrics/sample_map.cc b/base/metrics/sample_map.cc
index 8abd01edfaa203c13f64e35820a3696ce04e3b37..5ef0fb87ab604d23a5bdb203e774247c69c62257 100644
--- a/base/metrics/sample_map.cc
+++ b/base/metrics/sample_map.cc
@@ -84,8 +84,7 @@ SampleMap::~SampleMap() {}
void SampleMap::Accumulate(Sample value, Count count) {
sample_counts_[value] += count;
- IncreaseSum(static_cast<int64_t>(count) * value);
- IncreaseRedundantCount(count);
+ IncreaseSumAndCount(static_cast<int64_t>(count) * value, count);
}
Count SampleMap::GetCount(Sample value) const {

Powered by Google App Engine
This is Rietveld 408576698