| OLD | NEW |
| (Empty) | |
| 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. |
| 4 |
| 5 [ |
| 6 { |
| 7 "namespace": "metricsPrivate", |
| 8 "nodoc": true, |
| 9 "types": [ |
| 10 { |
| 11 "id": "MetricType", |
| 12 "type": "object", |
| 13 "description": "Describes the type of metric that is to be collected.", |
| 14 "properties": { |
| 15 "metricName": {"type": "string", "description": "A unique name within
the extension for the metric."}, |
| 16 "type": { |
| 17 "type": "string", |
| 18 "enum": ["histogram-log", "histogram-linear"], |
| 19 "description": "The type of metric, such as 'histogram-log' or 'hist
ogram-linear'." |
| 20 }, |
| 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 t
o use when separating the recorded values."} |
| 24 } |
| 25 } |
| 26 ], |
| 27 "functions": [ |
| 28 { |
| 29 "name": "recordUserAction", |
| 30 "type": "function", |
| 31 "description": "Records an action performed by the user.", |
| 32 "parameters": [ |
| 33 {"name": "name", "type": "string"} |
| 34 ] |
| 35 }, |
| 36 { |
| 37 "name": "recordPercentage", |
| 38 "type": "function", |
| 39 "description": "Records a percentage value from 1 to 100.", |
| 40 "parameters": [ |
| 41 {"name": "metricName", "type": "string"}, |
| 42 {"name": "value", "type": "integer"} |
| 43 ] |
| 44 }, |
| 45 { |
| 46 "name": "recordCount", |
| 47 "type": "function", |
| 48 "description": "Records a value than can range from 1 to 1,000,000.", |
| 49 "parameters": [ |
| 50 {"name": "metricName", "type": "string"}, |
| 51 {"name": "value", "type": "integer"} |
| 52 ] |
| 53 }, |
| 54 { |
| 55 "name": "recordSmallCount", |
| 56 "type": "function", |
| 57 "description": "Records a value than can range from 1 to 100.", |
| 58 "parameters": [ |
| 59 {"name": "metricName", "type": "string"}, |
| 60 {"name": "value", "type": "integer"} |
| 61 ] |
| 62 }, |
| 63 { |
| 64 "name": "recordMediumCount", |
| 65 "type": "function", |
| 66 "description": "Records a value than can range from 1 to 10,000.", |
| 67 "parameters": [ |
| 68 {"name": "metricName", "type": "string"}, |
| 69 {"name": "value", "type": "integer"} |
| 70 ] |
| 71 }, |
| 72 { |
| 73 "name": "recordTime", |
| 74 "type": "function", |
| 75 "description": "Records an elapsed time of no more than 10 seconds. The
sample value is specified in milliseconds.", |
| 76 "parameters": [ |
| 77 {"name": "metricName", "type": "string"}, |
| 78 {"name": "value", "type": "integer"} |
| 79 ] |
| 80 }, |
| 81 { |
| 82 "name": "recordMediumTime", |
| 83 "type": "function", |
| 84 "description": "Records an elapsed time of no more than 3 minutes. The
sample value is specified in milliseconds.", |
| 85 "parameters": [ |
| 86 {"name": "metricName", "type": "string"}, |
| 87 {"name": "value", "type": "integer"} |
| 88 ] |
| 89 }, |
| 90 { |
| 91 "name": "recordLongTime", |
| 92 "type": "function", |
| 93 "description": "Records an elapsed time of no more than 1 hour. The sam
ple value is specified in milliseconds.", |
| 94 "parameters": [ |
| 95 {"name": "metricName", "type": "string"}, |
| 96 {"name": "value", "type": "integer"} |
| 97 ] |
| 98 }, |
| 99 { |
| 100 "name": "recordValue", |
| 101 "type": "function", |
| 102 "description": "Adds a value to the given metric.", |
| 103 "parameters": [ |
| 104 {"name": "metric", "$ref": "MetricType"}, |
| 105 {"name": "value", "type": "integer"} |
| 106 ] |
| 107 } |
| 108 ], |
| 109 "events": [] |
| 110 } |
| 111 ] |
| OLD | NEW |