| 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
7(); | 43 static final InstrumentationBuilder nullBuilder = new InstrumentationBuilder_1
8(); |
| 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_18(); | 49 static InstrumentationLogger _NULL_LOGGER = new InstrumentationLogger_19(); |
| 50 | 50 |
| 51 /** | 51 /** |
| 52 * The current instrumentation logger. | 52 * The current instrumentation logger. |
| 53 */ | 53 */ |
| 54 static InstrumentationLogger _CURRENT_LOGGER = _NULL_LOGGER; | 54 static InstrumentationLogger _CURRENT_LOGGER = _NULL_LOGGER; |
| 55 | 55 |
| 56 /** | 56 /** |
| 57 * Create a builder that can collect the data associated with an operation. | 57 * Create a builder that can collect the data associated with an operation. |
| 58 * | 58 * |
| 59 * @param clazz the class performing the operation (not `null`) | 59 * @param clazz the class performing the operation (not `null`) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 85 /** | 85 /** |
| 86 * Set the logger that should receive instrumentation information to the given
logger. | 86 * Set the logger that should receive instrumentation information to the given
logger. |
| 87 * | 87 * |
| 88 * @param logger the logger that should receive instrumentation information | 88 * @param logger the logger that should receive instrumentation information |
| 89 */ | 89 */ |
| 90 static void set logger(InstrumentationLogger logger) { | 90 static void set logger(InstrumentationLogger logger) { |
| 91 _CURRENT_LOGGER = logger == null ? _NULL_LOGGER : logger; | 91 _CURRENT_LOGGER = logger == null ? _NULL_LOGGER : logger; |
| 92 } | 92 } |
| 93 } | 93 } |
| 94 | 94 |
| 95 class InstrumentationBuilder_17 implements InstrumentationBuilder { | 95 class InstrumentationBuilder_18 implements InstrumentationBuilder { |
| 96 InstrumentationBuilder data(String name, bool value) => this; | 96 InstrumentationBuilder data(String name, bool value) => this; |
| 97 | 97 |
| 98 InstrumentationBuilder data2(String name, int value) => this; | 98 InstrumentationBuilder data2(String name, int value) => this; |
| 99 | 99 |
| 100 InstrumentationBuilder data3(String name, String value) => this; | 100 InstrumentationBuilder data3(String name, String value) => this; |
| 101 | 101 |
| 102 InstrumentationBuilder data4(String name, List<String> value) => this; | 102 InstrumentationBuilder data4(String name, List<String> value) => this; |
| 103 | 103 |
| 104 InstrumentationLevel get instrumentationLevel => InstrumentationLevel.OFF; | 104 InstrumentationLevel get instrumentationLevel => InstrumentationLevel.OFF; |
| 105 | 105 |
| 106 void log() { | 106 void log() { |
| 107 } | 107 } |
| 108 | 108 |
| 109 void log2(int minTimeToLong) { | 109 void log2(int minTimeToLong) { |
| 110 } | 110 } |
| 111 | 111 |
| 112 InstrumentationBuilder metric(String name, bool value) => this; | 112 InstrumentationBuilder metric(String name, bool value) => this; |
| 113 | 113 |
| 114 InstrumentationBuilder metric2(String name, int value) => this; | 114 InstrumentationBuilder metric2(String name, int value) => this; |
| 115 | 115 |
| 116 InstrumentationBuilder metric3(String name, String value) => this; | 116 InstrumentationBuilder metric3(String name, String value) => this; |
| 117 | 117 |
| 118 InstrumentationBuilder metric4(String name, List<String> value) => this; | 118 InstrumentationBuilder metric4(String name, List<String> value) => this; |
| 119 | 119 |
| 120 InstrumentationBuilder record(Exception exception) => this; | 120 InstrumentationBuilder record(Exception exception) => this; |
| 121 } | 121 } |
| 122 | 122 |
| 123 class InstrumentationLogger_18 implements InstrumentationLogger { | 123 class InstrumentationLogger_19 implements InstrumentationLogger { |
| 124 InstrumentationBuilder createBuilder(String name) => Instrumentation.nullBuild
er; | 124 InstrumentationBuilder createBuilder(String name) => Instrumentation.nullBuild
er; |
| 125 } | 125 } |
| 126 | 126 |
| 127 /** | 127 /** |
| 128 * The interface `InstrumentationBuilder` defines the behavior of objects used t
o collect data | 128 * 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. | 129 * about an operation that has occurred and record that data through an instrume
ntation logger. |
| 130 * | 130 * |
| 131 * For an example of using objects that implement this interface, see [Instrumen
tation]. | 131 * For an example of using objects that implement this interface, see [Instrumen
tation]. |
| 132 * | 132 * |
| 133 * @coverage dart.engine.utilities | 133 * @coverage dart.engine.utilities |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 abstract class InstrumentationLogger { | 303 abstract class InstrumentationLogger { |
| 304 /** | 304 /** |
| 305 * Create a builder that can collect the data associated with an operation ide
ntified by the given | 305 * Create a builder that can collect the data associated with an operation ide
ntified by the given |
| 306 * name. | 306 * name. |
| 307 * | 307 * |
| 308 * @param name the name used to uniquely identify the operation | 308 * @param name the name used to uniquely identify the operation |
| 309 * @return the builder that was created | 309 * @return the builder that was created |
| 310 */ | 310 */ |
| 311 InstrumentationBuilder createBuilder(String name); | 311 InstrumentationBuilder createBuilder(String name); |
| 312 } | 312 } |
| OLD | NEW |