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

Unified Diff: components/metrics/public/interfaces/single_value_histograms.mojom

Issue 2687583002: Add support for single sample metrics. (Closed)
Patch Set: Use thread local storage. 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: components/metrics/public/interfaces/single_value_histograms.mojom
diff --git a/components/metrics/public/interfaces/single_value_histograms.mojom b/components/metrics/public/interfaces/single_value_histograms.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..4b044978b631e297e3ea14db8cd4c1d0ce1d7e68
--- /dev/null
+++ b/components/metrics/public/interfaces/single_value_histograms.mojom
@@ -0,0 +1,23 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module metrics.mojom;
+
+interface SingleValueHistogramsProvider {
+ // Returns a SingleValueHistogram for a counts type histogram.
+ //
+ // A single value histogram only reports its sample once at destruction time.
+ // The sample may be changed prior to destruction using the SetSample() method
+ // as many times as desired.
+ //
+ // See base/metrics/histograms.h for parameter definitions. |request| is the
+ // returned histogram.
+ AcquireSingleValueCountsHistogram(string name, int32 min, int32 max,
+ uint32 bucket_count,
+ SingleValueCountsHistogram& request);
+};
+
+interface SingleValueCountsHistogram {
+ SetSample(int32 sample);
+};

Powered by Google App Engine
This is Rietveld 408576698