OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/common/metrics/metrics_service_base.h" | 5 #include "chrome/common/metrics/metrics_service_base.h" |
6 | 6 |
7 #include <cstdlib> | 7 #include <cstdlib> |
8 | 8 |
9 #include "chrome/common/metrics/metrics_log_base.h" | 9 #include "chrome/common/metrics/metrics_log_base.h" |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... | |
31 "application/vnd.chrome.uma"; | 31 "application/vnd.chrome.uma"; |
32 | 32 |
33 void MetricsServiceBase::RecordCurrentHistograms() { | 33 void MetricsServiceBase::RecordCurrentHistograms() { |
34 DCHECK(log_manager_.current_log()); | 34 DCHECK(log_manager_.current_log()); |
35 histogram_snapshot_manager_.PrepareDeltas(base::Histogram::kNoFlags, true); | 35 histogram_snapshot_manager_.PrepareDeltas(base::Histogram::kNoFlags, true); |
36 } | 36 } |
37 | 37 |
38 void MetricsServiceBase::RecordDelta( | 38 void MetricsServiceBase::RecordDelta( |
39 const base::Histogram& histogram, | 39 const base::Histogram& histogram, |
40 const base::HistogramSamples& snapshot) { | 40 const base::HistogramSamples& snapshot) { |
41 log_manager_.current_log()->RecordHistogramDelta(histogram, snapshot); | 41 log_manager_.current_log()->RecordHistogramDelta(histogram.histogram_name(), |
Ilya Sherman
2012/12/29 00:17:30
This is a fine change, but why is it part of this
kaiwang
2013/01/08 00:51:40
In this CL, I changed most of the serializing rela
Ilya Sherman
2013/01/08 22:31:53
Ok, fair enough :)
| |
42 snapshot); | |
42 } | 43 } |
43 | 44 |
44 void MetricsServiceBase::InconsistencyDetected( | 45 void MetricsServiceBase::InconsistencyDetected( |
45 Histogram::Inconsistencies problem) { | 46 Histogram::Inconsistencies problem) { |
46 UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesBrowser", | 47 UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesBrowser", |
47 problem, Histogram::NEVER_EXCEEDED_VALUE); | 48 problem, Histogram::NEVER_EXCEEDED_VALUE); |
48 } | 49 } |
49 | 50 |
50 void MetricsServiceBase::UniqueInconsistencyDetected( | 51 void MetricsServiceBase::UniqueInconsistencyDetected( |
51 Histogram::Inconsistencies problem) { | 52 Histogram::Inconsistencies problem) { |
52 UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesBrowserUnique", | 53 UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesBrowserUnique", |
53 problem, Histogram::NEVER_EXCEEDED_VALUE); | 54 problem, Histogram::NEVER_EXCEEDED_VALUE); |
54 } | 55 } |
55 | 56 |
56 void MetricsServiceBase::InconsistencyDetectedInLoggedCount(int amount) { | 57 void MetricsServiceBase::InconsistencyDetectedInLoggedCount(int amount) { |
57 UMA_HISTOGRAM_COUNTS("Histogram.InconsistentSnapshotBrowser", | 58 UMA_HISTOGRAM_COUNTS("Histogram.InconsistentSnapshotBrowser", |
58 std::abs(amount)); | 59 std::abs(amount)); |
59 } | 60 } |
OLD | NEW |