Lines Matching refs:name
14 * A map from interval name to interval start timestamp.
20 * Should be followed by a call to recordInterval with the same name.
22 * @param {string} name Unique interval name.
24 metrics.startInterval = function(name) {
25 metrics.intervals[name] = Date.now();
32 * Convert a short metric name to the full format.
34 * @param {string} name Short metric name.
35 * @return {string} Full metric name.
38 metrics.convertName_ = function(name) {
39 return 'FileBrowser.' + name;
44 * @param {string} name Method name.
48 metrics.call_ = function(name, args) {
50 chrome.metricsPrivate[name].apply(chrome.metricsPrivate, args);
58 * with the same name and correct parameters.
60 * @param {string} name Method name.
62 metrics.decorate = function(name) {
63 metrics[name] = function() {
66 metrics.call_(name, args);
68 console.log('chrome.metricsPrivate.' + name, args);
81 * Should be preceded by a call to startInterval with the same name. *
83 * @param {string} name Unique interval name.
85 metrics.recordInterval = function(name) {
86 if (name in metrics.intervals) {
87 metrics.recordTime(name, Date.now() - metrics.intervals[name]);
89 console.error('Unknown interval: ' + name);
96 * @param {string} name Metric name.
101 metrics.recordEnum = function(name, value, validValues) {
104 if (validValues.constructor.name == 'Array') {
120 'metricName': metrics.convertName_(name),