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

Unified Diff: webrtc/system_wrappers/source/metrics_default.cc

Issue 2320473002: Make UMA stats creation available in the Java interface. (Closed)
Patch Set: Also update the example. Created 4 years, 3 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
« no previous file with comments | « webrtc/system_wrappers/include/metrics_default.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/source/metrics_default.cc
diff --git a/webrtc/system_wrappers/source/metrics_default.cc b/webrtc/system_wrappers/source/metrics_default.cc
index 49004543ea177938a7cd49a6ab6a784f5af26ee8..fd7610b1130bdd5956ceb8516ee7fb510206fd7d 100644
--- a/webrtc/system_wrappers/source/metrics_default.cc
+++ b/webrtc/system_wrappers/source/metrics_default.cc
@@ -244,6 +244,15 @@ void HistogramAdd(Histogram* histogram_pointer,
ptr->Add(sample);
}
+// Fast path. Adds |sample| to cached |histogram_pointer|.
+void HistogramAdd(Histogram* histogram_pointer, int sample) {
+ if (!histogram_pointer)
+ return;
+
+ RtcHistogram* ptr = reinterpret_cast<RtcHistogram*>(histogram_pointer);
+ ptr->Add(sample);
+}
+
SampleInfo::SampleInfo(const std::string& name,
int min,
int max,
« no previous file with comments | « webrtc/system_wrappers/include/metrics_default.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698