Blink roll 25b6bd3a7a131ffe68d809546ad1a20707915cdc:3a503f41ae42e5b79cfcd2ff10e65afde...
[chromium-blink-merge.git] / third_party / closure_compiler / externs / metrics_private.js
blobb2c9ef85dc2271e2f6713ea28331fd414215eb86
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 /** @fileoverview Externs generated from namespace: metricsPrivate */
7 /**
8 * Describes the type of metric that is to be collected.
9 * @typedef {{
10 * metricName: string,
11 * type: string,
12 * min: number,
13 * max: number,
14 * buckets: number
15 * }}
17 var MetricType;
19 /**
20 * @const
22 chrome.metricsPrivate = {};
24 /**
25 * Returns true if the user opted in to sending crash reports.
26 * @param {Function} callback
28 chrome.metricsPrivate.getIsCrashReportingEnabled = function(callback) {};
30 /**
31 * Returns the group name chosen for the named trial, or the empty string if
32 * the trial does not exist or is not enabled.
33 * @param {string} name
34 * @param {Function} callback
36 chrome.metricsPrivate.getFieldTrial = function(name, callback) {};
38 /**
39 * Returns variation parameters for the named trial if available, or undefined
40 * otherwise.
41 * @param {string} name
42 * @param {Function} callback
44 chrome.metricsPrivate.getVariationParams = function(name, callback) {};
46 /**
47 * Records an action performed by the user.
48 * @param {string} name
50 chrome.metricsPrivate.recordUserAction = function(name) {};
52 /**
53 * Records a percentage value from 1 to 100.
54 * @param {string} metricName
55 * @param {number} value
57 chrome.metricsPrivate.recordPercentage = function(metricName, value) {};
59 /**
60 * Records a value than can range from 1 to 1,000,000.
61 * @param {string} metricName
62 * @param {number} value
64 chrome.metricsPrivate.recordCount = function(metricName, value) {};
66 /**
67 * Records a value than can range from 1 to 100.
68 * @param {string} metricName
69 * @param {number} value
71 chrome.metricsPrivate.recordSmallCount = function(metricName, value) {};
73 /**
74 * Records a value than can range from 1 to 10,000.
75 * @param {string} metricName
76 * @param {number} value
78 chrome.metricsPrivate.recordMediumCount = function(metricName, value) {};
80 /**
81 * Records an elapsed time of no more than 10 seconds. The sample value is
82 * specified in milliseconds.
83 * @param {string} metricName
84 * @param {number} value
86 chrome.metricsPrivate.recordTime = function(metricName, value) {};
88 /**
89 * Records an elapsed time of no more than 3 minutes. The sample value is
90 * specified in milliseconds.
91 * @param {string} metricName
92 * @param {number} value
94 chrome.metricsPrivate.recordMediumTime = function(metricName, value) {};
96 /**
97 * Records an elapsed time of no more than 1 hour. The sample value is
98 * specified in milliseconds.
99 * @param {string} metricName
100 * @param {number} value
102 chrome.metricsPrivate.recordLongTime = function(metricName, value) {};
105 * Increments the count associated with |value| in the sparse histogram defined
106 * by the |metricName|.
107 * @param {string} metricName
108 * @param {number} value
110 chrome.metricsPrivate.recordSparseValue = function(metricName, value) {};
113 * Adds a value to the given metric.
114 * @param {MetricType} metric
115 * @param {number} value
117 chrome.metricsPrivate.recordValue = function(metric, value) {};