| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 | 3 |
| 4 library engine.instrumentation; | 4 library engine.instrumentation; |
| 5 | 5 |
| 6 import 'java_core.dart'; | 6 import 'java_core.dart'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * The class `Instrumentation` implements support for logging instrumentation in
formation. | 9 * The class `Instrumentation` implements support for logging instrumentation in
formation. |
| 10 * | 10 * |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 * arguments and records the time at which the method is called so that the time
to complete the | 33 * arguments and records the time at which the method is called so that the time
to complete the |
| 34 * save operation can be calculated. The `log` method tells the builder that all
of the data | 34 * save operation can be calculated. The `log` method tells the builder that all
of the data |
| 35 * has been collected and that the resulting information should be logged. | 35 * has been collected and that the resulting information should be logged. |
| 36 * | 36 * |
| 37 * @coverage dart.engine.utilities | 37 * @coverage dart.engine.utilities |
| 38 */ | 38 */ |
| 39 class Instrumentation { | 39 class Instrumentation { |
| 40 /** | 40 /** |
| 41 * A builder that will silently ignore all data and logging requests. | 41 * A builder that will silently ignore all data and logging requests. |
| 42 */ | 42 */ |
| 43 static final InstrumentationBuilder nullBuilder = new InstrumentationBuilder_1
8(); | 43 static InstrumentationBuilder _NULL_INSTRUMENTATION_BUILDER = new Instrumentat
ionBuilder_18(); |
| 44 | 44 |
| 45 /** | 45 /** |
| 46 * An instrumentation logger that can be used when no other instrumentation lo
gger has been | 46 * An instrumentation logger that can be used when no other instrumentation lo
gger has been |
| 47 * configured. This logger will silently ignore all data and logging requests. | 47 * configured. This logger will silently ignore all data and logging requests. |
| 48 */ | 48 */ |
| 49 static InstrumentationLogger _NULL_LOGGER = new InstrumentationLogger_19(); | 49 static InstrumentationLogger _NULL_LOGGER = new InstrumentationLogger_19(); |
| 50 | 50 |
| 51 /** | 51 /** |
| 52 * The current instrumentation logger. | 52 * The current instrumentation logger. |
| 53 */ | 53 */ |
| (...skipping 14 matching lines...) Expand all Loading... |
| 68 * @return the builder that was created (not `null`) | 68 * @return the builder that was created (not `null`) |
| 69 */ | 69 */ |
| 70 static InstrumentationBuilder builder2(String name) => _CURRENT_LOGGER.createB
uilder(name); | 70 static InstrumentationBuilder builder2(String name) => _CURRENT_LOGGER.createB
uilder(name); |
| 71 | 71 |
| 72 /** | 72 /** |
| 73 * Get the currently active instrumentation logger | 73 * Get the currently active instrumentation logger |
| 74 */ | 74 */ |
| 75 static InstrumentationLogger get logger => _CURRENT_LOGGER; | 75 static InstrumentationLogger get logger => _CURRENT_LOGGER; |
| 76 | 76 |
| 77 /** | 77 /** |
| 78 * Return a builder that will silently ignore all data and logging requests. |
| 79 * |
| 80 * @return the builder (not `null`) |
| 81 */ |
| 82 static InstrumentationBuilder get nullBuilder => _NULL_INSTRUMENTATION_BUILDER
; |
| 83 |
| 84 /** |
| 78 * Is this instrumentation system currently configured to drop instrumentation
data provided to | 85 * Is this instrumentation system currently configured to drop instrumentation
data provided to |
| 79 * it? | 86 * it? |
| 80 * | 87 * |
| 81 * @return | 88 * @return |
| 82 */ | 89 */ |
| 83 static bool get isNullLogger => identical(_CURRENT_LOGGER, _NULL_LOGGER); | 90 static bool get isNullLogger => identical(_CURRENT_LOGGER, _NULL_LOGGER); |
| 84 | 91 |
| 85 /** | 92 /** |
| 86 * Set the logger that should receive instrumentation information to the given
logger. | 93 * Set the logger that should receive instrumentation information to the given
logger. |
| 87 * | 94 * |
| (...skipping 26 matching lines...) Expand all Loading... |
| 114 InstrumentationBuilder metric2(String name, int value) => this; | 121 InstrumentationBuilder metric2(String name, int value) => this; |
| 115 | 122 |
| 116 InstrumentationBuilder metric3(String name, String value) => this; | 123 InstrumentationBuilder metric3(String name, String value) => this; |
| 117 | 124 |
| 118 InstrumentationBuilder metric4(String name, List<String> value) => this; | 125 InstrumentationBuilder metric4(String name, List<String> value) => this; |
| 119 | 126 |
| 120 InstrumentationBuilder record(Exception exception) => this; | 127 InstrumentationBuilder record(Exception exception) => this; |
| 121 } | 128 } |
| 122 | 129 |
| 123 class InstrumentationLogger_19 implements InstrumentationLogger { | 130 class InstrumentationLogger_19 implements InstrumentationLogger { |
| 124 InstrumentationBuilder createBuilder(String name) => Instrumentation.nullBuild
er; | 131 InstrumentationBuilder createBuilder(String name) => Instrumentation._NULL_INS
TRUMENTATION_BUILDER; |
| 125 } | 132 } |
| 126 | 133 |
| 127 /** | 134 /** |
| 128 * The interface `InstrumentationBuilder` defines the behavior of objects used t
o collect data | 135 * The interface `InstrumentationBuilder` defines the behavior of objects used t
o collect data |
| 129 * about an operation that has occurred and record that data through an instrume
ntation logger. | 136 * about an operation that has occurred and record that data through an instrume
ntation logger. |
| 130 * | 137 * |
| 131 * For an example of using objects that implement this interface, see [Instrumen
tation]. | 138 * For an example of using objects that implement this interface, see [Instrumen
tation]. |
| 132 * | 139 * |
| 133 * @coverage dart.engine.utilities | 140 * @coverage dart.engine.utilities |
| 134 */ | 141 */ |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 abstract class InstrumentationLogger { | 310 abstract class InstrumentationLogger { |
| 304 /** | 311 /** |
| 305 * Create a builder that can collect the data associated with an operation ide
ntified by the given | 312 * Create a builder that can collect the data associated with an operation ide
ntified by the given |
| 306 * name. | 313 * name. |
| 307 * | 314 * |
| 308 * @param name the name used to uniquely identify the operation | 315 * @param name the name used to uniquely identify the operation |
| 309 * @return the builder that was created | 316 * @return the builder that was created |
| 310 */ | 317 */ |
| 311 InstrumentationBuilder createBuilder(String name); | 318 InstrumentationBuilder createBuilder(String name); |
| 312 } | 319 } |
| OLD | NEW |