| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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> |
| OLD | NEW |