OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 [ | 5 [ |
6 { | 6 { |
7 "namespace": "metricsPrivate", | 7 "namespace": "metricsPrivate", |
8 "description": "none", | 8 "description": "none", |
9 "types": [ | 9 "types": [ |
10 { | 10 { |
| 11 "id": "MetricTypeType", |
| 12 "type": "string", |
| 13 "enum": ["histogram-log", "histogram-linear"], |
| 14 "description": "The type of metric, such as 'histogram-log' or 'histogra
m-linear'." |
| 15 }, |
| 16 { |
11 "id": "MetricType", | 17 "id": "MetricType", |
12 "type": "object", | 18 "type": "object", |
13 "description": "Describes the type of metric that is to be collected.", | 19 "description": "Describes the type of metric that is to be collected.", |
14 "properties": { | 20 "properties": { |
15 "metricName": {"type": "string", "description": "A unique name within
the extension for the metric."}, | 21 "metricName": {"type": "string", "description": "A unique name within
the extension for the metric."}, |
16 "type": { | 22 "type": { |
17 "type": "string", | 23 "$ref": "MetricTypeType" |
18 "enum": ["histogram-log", "histogram-linear"], | |
19 "description": "The type of metric, such as 'histogram-log' or 'hist
ogram-linear'." | |
20 }, | 24 }, |
21 "min": {"type": "integer", "description": "The minimum sample value to
be recoded. Must be greater than zero."}, | 25 "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."}, | 26 "max": {"type": "integer", "description": "The maximum sample value to
be recoded."}, |
23 "buckets": {"type": "integer", "description": "The number of buckets t
o use when separating the recorded values."} | 27 "buckets": {"type": "integer", "description": "The number of buckets t
o use when separating the recorded values."} |
24 } | 28 } |
25 } | 29 } |
26 ], | 30 ], |
27 "functions": [ | 31 "functions": [ |
28 { | 32 { |
29 "name": "getIsCrashReportingEnabled", | 33 "name": "getIsCrashReportingEnabled", |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 "description": "Adds a value to the given metric.", | 167 "description": "Adds a value to the given metric.", |
164 "parameters": [ | 168 "parameters": [ |
165 {"name": "metric", "$ref": "MetricType"}, | 169 {"name": "metric", "$ref": "MetricType"}, |
166 {"name": "value", "type": "integer"} | 170 {"name": "value", "type": "integer"} |
167 ] | 171 ] |
168 } | 172 } |
169 ], | 173 ], |
170 "events": [] | 174 "events": [] |
171 } | 175 } |
172 ] | 176 ] |
OLD | NEW |