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
3 // found in the LICENSE file.
7 "namespace": "metricsPrivate",
13 "description": "Describes the type of metric that is to be collected.",
15 "metricName": {"type": "string", "description": "A unique name within the extension for the metric."},
18 "enum": ["histogram-log", "histogram-linear"],
19 "description": "The type of metric, such as 'histogram-log' or 'histogram-linear'."
21 "min": {"type": "integer", "description": "The minimum sample value to be recoded. Must be greater than zero."},
22 "max": {"type": "integer", "description": "The maximum sample value to be recoded."},
23 "buckets": {"type": "integer", "description": "The number of buckets to use when separating the recorded values."}
29 "name": "recordUserAction",
31 "description": "Records an action performed by the user.",
33 {"name": "name", "type": "string"}
37 "name": "recordPercentage",
39 "description": "Records a percentage value from 1 to 100.",
41 {"name": "metricName", "type": "string"},
42 {"name": "value", "type": "integer"}
46 "name": "recordCount",
48 "description": "Records a value than can range from 1 to 1,000,000.",
50 {"name": "metricName", "type": "string"},
51 {"name": "value", "type": "integer"}
55 "name": "recordSmallCount",
57 "description": "Records a value than can range from 1 to 100.",
59 {"name": "metricName", "type": "string"},
60 {"name": "value", "type": "integer"}
64 "name": "recordMediumCount",
66 "description": "Records a value than can range from 1 to 10,000.",
68 {"name": "metricName", "type": "string"},
69 {"name": "value", "type": "integer"}
75 "description": "Records an elapsed time of no more than 10 seconds. The sample value is specified in milliseconds.",
77 {"name": "metricName", "type": "string"},
78 {"name": "value", "type": "integer"}
82 "name": "recordMediumTime",
84 "description": "Records an elapsed time of no more than 3 minutes. The sample value is specified in milliseconds.",
86 {"name": "metricName", "type": "string"},
87 {"name": "value", "type": "integer"}
91 "name": "recordLongTime",
93 "description": "Records an elapsed time of no more than 1 hour. The sample value is specified in milliseconds.",
95 {"name": "metricName", "type": "string"},
96 {"name": "value", "type": "integer"}
100 "name": "recordValue",
102 "description": "Adds a value to the given metric.",
104 {"name": "metric", "$ref": "MetricType"},
105 {"name": "value", "type": "integer"}