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

Side by Side Diff: tracing/tracing/base/unit.html

Issue 3003163002: Add CsvOutputFormatter to Telemetry. (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 | « tracing/bin/histograms2csv ('k') | tracing/tracing/value/add_shared_diagnostic_cmdline.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright 2015 The Chromium Authors. All rights reserved. 3 Copyright 2015 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/event.html"> 8 <link rel="import" href="/tracing/base/event.html">
9 <link rel="import" href="/tracing/base/event_target.html"> 9 <link rel="import" href="/tracing/base/event_target.html">
10 <link rel="import" href="/tracing/base/time_display_modes.html"> 10 <link rel="import" href="/tracing/base/time_display_modes.html">
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 124 }
125 return scale; 125 return scale;
126 }, 126 },
127 127
128 get unitString() { 128 get unitString() {
129 const scale = this.getUnitScale_(); 129 const scale = this.getUnitScale_();
130 if (!scale) { 130 if (!scale) {
131 throw new Error( 131 throw new Error(
132 'A UnitScale could not be found for Unit ' + this.unitName); 132 'A UnitScale could not be found for Unit ' + this.unitName);
133 } 133 }
134 return scale[0].baseSymbol || scale[0].symbol; 134 return scale[0].symbol;
135 }, 135 },
136 136
137 /** 137 /**
138 * Returns a human readable string representation of the value passed. 138 * Returns a human readable string representation of the value passed.
139 * 139 *
140 * Example: .00023 formatted using the timeInMsAutoFormat Unit would return 140 * Example: .00023 formatted using the timeInMsAutoFormat Unit would return
141 * '230 ns' since the base unit scale is ms. 141 * '230 ns' since the base unit scale is ms.
142 * 142 *
143 * @param {number} value - The value to be formatted. 143 * @param {number} value - The value to be formatted.
144 * @param {Object} [opt_context] - Optional formatting parameters. 144 * @param {Object} [opt_context] - Optional formatting parameters.
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 maximumFractionDigits: 1 425 maximumFractionDigits: 1
426 } 426 }
427 }); 427 });
428 428
429 return { 429 return {
430 ImprovementDirection, 430 ImprovementDirection,
431 Unit, 431 Unit,
432 }; 432 };
433 }); 433 });
434 </script> 434 </script>
OLDNEW
« no previous file with comments | « tracing/bin/histograms2csv ('k') | tracing/tracing/value/add_shared_diagnostic_cmdline.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698