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

Side by Side Diff: docs/how-to-write-metrics.md

Issue 2998043002: Remove RelatedHistogramSet. (Closed)
Patch Set: Created 3 years, 4 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 | « docs/histogram-set-json-format.md ('k') | tracing/trace_viewer.gypi » ('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 # How to Write Metrics 6 # How to Write Metrics
7 7
8 Timeline-Based Measurement v2 is a system for computing metrics from traces. 8 Timeline-Based Measurement v2 is a system for computing metrics from traces.
9 9
10 A TBM2 metric is a Javascript function that takes a trace Model and produces 10 A TBM2 metric is a Javascript function that takes a trace Model and produces
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 * [DateRange](/tracing/tracing/value/diagnostics/date_range.html): 143 * [DateRange](/tracing/tracing/value/diagnostics/date_range.html):
144 This is a Range of Dates. It cannot be empty, but the minDate could be the 144 This is a Range of Dates. It cannot be empty, but the minDate could be the
145 same as the maxDate. Telemetry automatically adds 2 shared DateRanges to all 145 same as the maxDate. Telemetry automatically adds 2 shared DateRanges to all
146 results: 'benchmarkStart' and 'traceStart'. 146 results: 'benchmarkStart' and 'traceStart'.
147 147
148 ![](/docs/images/how-to-write-metrics-date-range.png) 148 ![](/docs/images/how-to-write-metrics-date-range.png)
149 149
150 ### Histogram Relationship Diagnostics 150 ### Histogram Relationship Diagnostics
151 151
152 * [RelatedHistogramSet](/tracing/tracing/value/diagnostics/related_histogram_se t.html):
153 These are Sets of references to other Histograms. Visually, they are a set
154 of HTML links which, when clicked, select the contained Histograms. The text
155 content of the HTML link is the name of the referenced Histogram.
156
157 ![](/docs/images/how-to-write-metrics-related-histogram-set.png)
158
159 * [RelatedHistogramMap](/tracing/tracing/value/diagnostics/related_histogram_ma p.html): 152 * [RelatedHistogramMap](/tracing/tracing/value/diagnostics/related_histogram_ma p.html):
160 These are Maps from strings to references to other Histograms. Visually, they 153 These are Maps from strings to references to other Histograms. Visually, they
161 are a set of HTML links similar to RelatedHistogramSet, but the text content of 154 are a set of HTML links where the text content of the link is the Map's
162 the link is the Map's string key instead of the Histogram's name. One example 155 string key instead of the Histogram's name. One example application is when a
163 application is when a Histogram was produced not directly by a metric, but 156 Histogram was produced not directly by a metric, but rather by merging
164 rather by merging together other Histograms, then it will have a 157 together other Histograms, then it will have a RelatedHistogramMap named
165 RelatedHistogramMap named 'mergedFrom' that refers to the Histograms that wer e 158 'mergedFrom' that refers to the Histograms that were merged by their grouping
166 merged by their grouping key, e.g. the telemetry story name. 159 key, e.g. the telemetry story name.
167 160
168 ![](/docs/images/how-to-write-metrics-related-histogram-map.png) 161 ![](/docs/images/how-to-write-metrics-related-histogram-map.png)
169 162
170 * [RelatedHistogramBreakdown](/tracing/tracing/value/diagnostics/related_histog ram_breakdown.html): 163 * [RelatedHistogramBreakdown](/tracing/tracing/value/diagnostics/related_histog ram_breakdown.html):
171 Structurally, this is a RelatedHistogramMap, but conceptually and visually, t his 164 Structurally, this is a RelatedHistogramMap, but conceptually and visually, t his
172 is a Breakdown. Whereas Breakdown's stacked bar chart derives its data from 165 is a Breakdown. Whereas Breakdown's stacked bar chart derives its data from
173 the numbers contained explicitly in the Breakdown, a 166 the numbers contained explicitly in the Breakdown, a
174 RelatedHistogramBreakdown's stacked 167 RelatedHistogramBreakdown's stacked
175 bar chart derives its data from the referenced Histograms' sums. 168 bar chart derives its data from the referenced Histograms' sums.
176 169
(...skipping 20 matching lines...) Expand all
197 ![](/docs/images/how-to-write-metrics-buildbot.png) 190 ![](/docs/images/how-to-write-metrics-buildbot.png)
198 191
199 ### Other Diagnostics 192 ### Other Diagnostics
200 193
201 * [Scalar](/tracing/tracing/value/diagnostics/scalar.html): 194 * [Scalar](/tracing/tracing/value/diagnostics/scalar.html):
202 Metrics must not use this, since it is incapable of being merged. It is 195 Metrics must not use this, since it is incapable of being merged. It is
203 mentioned here for completeness. It wraps a Scalar, which is just a 196 mentioned here for completeness. It wraps a Scalar, which is just a
204 unitted number. This is only to allow Histograms in other parts of the trace 197 unitted number. This is only to allow Histograms in other parts of the trace
205 viewer to display number sample diagnostics more intelligently than 198 viewer to display number sample diagnostics more intelligently than
206 GenericSet can. If a metric wants to display number sample diagnostics 199 GenericSet can. If a metric wants to display number sample diagnostics
207 intelligently, then it should use RelatedHistogramSet or RelatedHistogramMap; 200 intelligently, then it should use RelatedHistogramMap; if it does not want to
208 if it does not want to monitor changes in those numbers, then the TBM2 201 monitor changes in those numbers, then the TBM2 maintainers can add a
209 maintainers can add a HistogramDiagnostic that supports merging. 202 HistogramDiagnostic that supports merging.
210 203
211 204
212 ## Consumers of Histograms 205 ## Consumers of Histograms
213 206
214 Histograms are consumed by 207 Histograms are consumed by
215 208
216 * [histogram-set-table](/tracing/tracing/value/ui/histogram_set_table.html) in 209 * [histogram-set-table](/tracing/tracing/value/ui/histogram_set_table.html) in
217 both results2.html and the Metrics side panel in trace viewer, 210 both results2.html and the Metrics side panel in trace viewer,
218 * the [dashboard](https://chromeperf.appspot.com) indirectly via their statisti cs. 211 * the [dashboard](https://chromeperf.appspot.com) indirectly via their statisti cs.
219 212
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 * Instead of having one category for all story grouping keys, each grouping 248 * Instead of having one category for all story grouping keys, each grouping
256 individual grouping key may be listed as a category. For example, in Page 249 individual grouping key may be listed as a category. For example, in Page
257 Cycler v2 benchmarks, the "cache_temperature" grouping key would be 250 Cycler v2 benchmarks, the "cache_temperature" grouping key would be
258 displayed as a category. 251 displayed as a category.
259 * Choosing groups builds a hierarchy of histograms that is filled in by merging 252 * Choosing groups builds a hierarchy of histograms that is filled in by merging
260 histograms from the bottom up. Expanding the rows of histogram-set-table, any 253 histograms from the bottom up. Expanding the rows of histogram-set-table, any
261 leaf nodes are histograms that were loaded, and their ancestors are computed b y 254 leaf nodes are histograms that were loaded, and their ancestors are computed b y
262 merging. 255 merging.
263 * histogram-set-table uses the "label" property of TelemetryInfo to define the 256 * histogram-set-table uses the "label" property of TelemetryInfo to define the
264 columns of the table. 257 columns of the table.
OLDNEW
« no previous file with comments | « docs/histogram-set-json-format.md ('k') | tracing/trace_viewer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698