Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: docs/histogram-set-json-format.md

Issue 3009553002: Refactor Histogram relationship diagnostics. (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | docs/how-to-write-metrics.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- Copyright 2016 The Chromium Authors. All rights reserved. 1 <!-- Copyright 2016 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 # HistogramSet JSON Format 6 # HistogramSet JSON Format
7 7
8 This document assumes familiarity with the concepts introduced in 8 This document assumes familiarity with the concepts introduced in
9 [how-to-write-metrics](/docs/how-to-write-metrics.md). 9 [how-to-write-metrics](/docs/how-to-write-metrics.md).
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 "values": ["browse:news:cnn"], 54 "values": ["browse:news:cnn"],
55 }, 55 },
56 ] 56 ]
57 ``` 57 ```
58 58
59 ## Histograms 59 ## Histograms
60 60
61 ### Required fields 61 ### Required fields
62 62
63 * `name`: any string 63 * `name`: any string
64 * `guid`: string UUID, allows Histograms to reference other Histograms via 64 * `guid`: string UUID
65 RelatedHistogram Diagnostics
66 * `unit`: underscore-separated string of 1 or 2 parts: 65 * `unit`: underscore-separated string of 1 or 2 parts:
67 * The required unit base name must be one of 66 * The required unit base name must be one of
68 * ms 67 * ms
69 * tsMs 68 * tsMs
70 * n% 69 * n%
71 * sizeInBytes 70 * sizeInBytes
72 * J 71 * J
73 * W 72 * W
74 * unitless 73 * unitless
75 * count 74 * count
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 117
119 DiagnosticMap is a dictionary mapping strings to Diagnostic dictionaries. 118 DiagnosticMap is a dictionary mapping strings to Diagnostic dictionaries.
120 119
121 ## Diagnostics 120 ## Diagnostics
122 121
123 The only field that is required for all Diagnostics, `type`, must be one of 122 The only field that is required for all Diagnostics, `type`, must be one of
124 * `Breakdown` 123 * `Breakdown`
125 * `DateRange` 124 * `DateRange`
126 * `GenericSet` 125 * `GenericSet`
127 * `RelatedEventSet` 126 * `RelatedEventSet`
128 * `RelatedHistogramBreakdown` 127 * `RelatedNameMap`
129 * `RelatedHistogramMap`
130 * `Scalar` 128 * `Scalar`
131 129
132 If a Diagnostic is in the root array of the JSON, then it is shared, so it may b e 130 If a Diagnostic is in the root array of the JSON, then it is shared, so it may b e
133 referenced by multiple Histograms. Shared Diagnostics must contain a string 131 referenced by multiple Histograms. Shared Diagnostics must contain a string
134 field `guid` containing a UUID. 132 field `guid` containing a UUID.
135 133
136 If a Diagnostic is contained in a Histogram, then it must not have a `guid` 134 If a Diagnostic is contained in a Histogram, then it must not have a `guid`
137 field. 135 field.
138 136
139 The other fields of Diagnostic dictionaries depend on `type`. 137 The other fields of Diagnostic dictionaries depend on `type`.
(...skipping 20 matching lines...) Expand all
160 * `values`: array of any JSON data. 158 * `values`: array of any JSON data.
161 159
162 ### RelatedEventSet 160 ### RelatedEventSet
163 161
164 This allows metrics to explain the magnitude of a sample as a parameter of a 162 This allows metrics to explain the magnitude of a sample as a parameter of a
165 specific event or set of events in a trace. 163 specific event or set of events in a trace.
166 164
167 * `events`: array of dictionaries containing `stableId`, `title`, `start`, 165 * `events`: array of dictionaries containing `stableId`, `title`, `start`,
168 `duration` fields of Events 166 `duration` fields of Events
169 167
170 ### RelatedHistogramMap
171 168
172 This allows metrics to annotate which Histograms are related to other 169 ### RelatedNameMap
173 Histograms, and annotate the nature of the relationship with a custom string
174 name.
175 170
176 * `values`: dictionary mapping from custom string name to the related 171 This is a Map from short descriptive names to full Histogram names.
177 Histogram's string guid
178 172
179 ### RelatedHistogramBreakdown 173 * `names`: a dictionary mapping strings to strings containing Histogram names.
180
181 This allows metrics to explain the magnitudes of the samples in a Histogram
182 collectively as composed of various categories.
183
184 * `values`: dictionary mapping from custom string name to the related
185 Histogram's string guid
186 174
187 ### Scalar 175 ### Scalar
188 176
189 Metrics should not use Scalar diagnostics since they cannot be safely merged. 177 Metrics should not use Scalar diagnostics since they cannot be safely merged.
190 178
191 * `value`: a dictionary containing a string `unit` and a number `value` 179 * `value`: a dictionary containing a string `unit` and a number `value`
OLDNEW
« no previous file with comments | « no previous file | docs/how-to-write-metrics.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698