| 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 library engine.instrumentation; | 3 library engine.instrumentation; |
| 4 import 'java_core.dart'; | 4 import 'java_core.dart'; |
| 5 /** | 5 /** |
| 6 * The class `Instrumentation` implements support for logging instrumentation in
formation. | 6 * The class `Instrumentation` implements support for logging instrumentation in
formation. |
| 7 * | 7 * |
| 8 * Instrumentation information consists of information about specific operations
. Those operations | 8 * Instrumentation information consists of information about specific operations
. Those operations |
| 9 * can range from user-facing operations, such as saving the changes to a file,
to internal | 9 * can range from user-facing operations, such as saving the changes to a file,
to internal |
| 10 * operations, such as tokenizing source code. The information to be logged is g
athered by | 10 * operations, such as tokenizing source code. The information to be logged is g
athered by |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 * save operation can be calculated. The `log` method tells the builder that all
of the data | 31 * save operation can be calculated. The `log` method tells the builder that all
of the data |
| 32 * has been collected and that the resulting information should be logged. | 32 * has been collected and that the resulting information should be logged. |
| 33 * | 33 * |
| 34 * @coverage dart.engine.utilities | 34 * @coverage dart.engine.utilities |
| 35 */ | 35 */ |
| 36 class Instrumentation { | 36 class Instrumentation { |
| 37 | 37 |
| 38 /** | 38 /** |
| 39 * A builder that will silently ignore all data and logging requests. | 39 * A builder that will silently ignore all data and logging requests. |
| 40 */ | 40 */ |
| 41 static InstrumentationBuilder _NULL_INSTRUMENTATION_BUILDER = new Instrumentat
ionBuilder_14(); | 41 static InstrumentationBuilder _NULL_INSTRUMENTATION_BUILDER = new Instrumentat
ionBuilder_16(); |
| 42 | 42 |
| 43 /** | 43 /** |
| 44 * An instrumentation logger that can be used when no other instrumentation lo
gger has been | 44 * An instrumentation logger that can be used when no other instrumentation lo
gger has been |
| 45 * configured. This logger will silently ignore all data and logging requests. | 45 * configured. This logger will silently ignore all data and logging requests. |
| 46 */ | 46 */ |
| 47 static InstrumentationLogger _NULL_LOGGER = new InstrumentationLogger_15(); | 47 static InstrumentationLogger _NULL_LOGGER = new InstrumentationLogger_17(); |
| 48 | 48 |
| 49 /** | 49 /** |
| 50 * The current instrumentation logger. | 50 * The current instrumentation logger. |
| 51 */ | 51 */ |
| 52 static InstrumentationLogger _CURRENT_LOGGER = _NULL_LOGGER; | 52 static InstrumentationLogger _CURRENT_LOGGER = _NULL_LOGGER; |
| 53 | 53 |
| 54 /** | 54 /** |
| 55 * Create a builder that can collect the data associated with an operation. | 55 * Create a builder that can collect the data associated with an operation. |
| 56 * | 56 * |
| 57 * @param clazz the class performing the operation (not `null`) | 57 * @param clazz the class performing the operation (not `null`) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 /** | 90 /** |
| 91 * Set the logger that should receive instrumentation information to the given
logger. | 91 * Set the logger that should receive instrumentation information to the given
logger. |
| 92 * | 92 * |
| 93 * @param logger the logger that should receive instrumentation information | 93 * @param logger the logger that should receive instrumentation information |
| 94 */ | 94 */ |
| 95 static void set logger(InstrumentationLogger logger2) { | 95 static void set logger(InstrumentationLogger logger2) { |
| 96 _CURRENT_LOGGER = logger2 == null ? _NULL_LOGGER : logger2; | 96 _CURRENT_LOGGER = logger2 == null ? _NULL_LOGGER : logger2; |
| 97 } | 97 } |
| 98 } | 98 } |
| 99 class InstrumentationBuilder_14 implements InstrumentationBuilder { | 99 class InstrumentationBuilder_16 implements InstrumentationBuilder { |
| 100 InstrumentationBuilder data(String name, bool value) => this; | 100 InstrumentationBuilder data(String name, bool value) => this; |
| 101 InstrumentationBuilder data2(String name, int value) => this; | 101 InstrumentationBuilder data2(String name, int value) => this; |
| 102 InstrumentationBuilder data3(String name, String value) => this; | 102 InstrumentationBuilder data3(String name, String value) => this; |
| 103 InstrumentationBuilder data4(String name, List<String> value) => this; | 103 InstrumentationBuilder data4(String name, List<String> value) => this; |
| 104 InstrumentationLevel get instrumentationLevel => InstrumentationLevel.OFF; | 104 InstrumentationLevel get instrumentationLevel => InstrumentationLevel.OFF; |
| 105 void log() { | 105 void log() { |
| 106 } | 106 } |
| 107 void log2(int minTimeToLong) { | 107 void log2(int minTimeToLong) { |
| 108 } | 108 } |
| 109 InstrumentationBuilder metric(String name, bool value) => this; | 109 InstrumentationBuilder metric(String name, bool value) => this; |
| 110 InstrumentationBuilder metric2(String name, int value) => this; | 110 InstrumentationBuilder metric2(String name, int value) => this; |
| 111 InstrumentationBuilder metric3(String name, String value) => this; | 111 InstrumentationBuilder metric3(String name, String value) => this; |
| 112 InstrumentationBuilder metric4(String name, List<String> value) => this; | 112 InstrumentationBuilder metric4(String name, List<String> value) => this; |
| 113 InstrumentationBuilder record(Exception exception) => this; | 113 InstrumentationBuilder record(Exception exception) => this; |
| 114 } | 114 } |
| 115 class InstrumentationLogger_15 implements InstrumentationLogger { | 115 class InstrumentationLogger_17 implements InstrumentationLogger { |
| 116 InstrumentationBuilder createBuilder(String name) => Instrumentation._NULL_INS
TRUMENTATION_BUILDER; | 116 InstrumentationBuilder createBuilder(String name) => Instrumentation._NULL_INS
TRUMENTATION_BUILDER; |
| 117 } | 117 } |
| 118 /** | 118 /** |
| 119 * The interface `InstrumentationBuilder` defines the behavior of objects used t
o collect data | 119 * The interface `InstrumentationBuilder` defines the behavior of objects used t
o collect data |
| 120 * about an operation that has occurred and record that data through an instrume
ntation logger. | 120 * about an operation that has occurred and record that data through an instrume
ntation logger. |
| 121 * | 121 * |
| 122 * For an example of using objects that implement this interface, see [Instrumen
tation]. | 122 * For an example of using objects that implement this interface, see [Instrumen
tation]. |
| 123 * | 123 * |
| 124 * @coverage dart.engine.utilities | 124 * @coverage dart.engine.utilities |
| 125 */ | 125 */ |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 | 292 |
| 293 /** | 293 /** |
| 294 * Create a builder that can collect the data associated with an operation ide
ntified by the given | 294 * Create a builder that can collect the data associated with an operation ide
ntified by the given |
| 295 * name. | 295 * name. |
| 296 * | 296 * |
| 297 * @param name the name used to uniquely identify the operation | 297 * @param name the name used to uniquely identify the operation |
| 298 * @return the builder that was created | 298 * @return the builder that was created |
| 299 */ | 299 */ |
| 300 InstrumentationBuilder createBuilder(String name); | 300 InstrumentationBuilder createBuilder(String name); |
| 301 } | 301 } |
| OLD | NEW |