| 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 {@code Instrumentation} implements support for logging instrumentat
ion information. | 9 * The class {@code Instrumentation} implements support for logging instrumentat
ion information. |
| 10 * <p> | 10 * <p> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * The {@code Instrumentation.builder} method creates a new {@link Instrumentati
onBuilderinstrumentation builder} and records the time at which it was created.
The{@link InstrumentationBuilder#metric(String,long)} appends the information sp
ecified by the | 27 * The {@code Instrumentation.builder} method creates a new {@link Instrumentati
onBuilderinstrumentation builder} and records the time at which it was created.
The{@link InstrumentationBuilder#metric(String,long)} appends the information sp
ecified by the |
| 28 * arguments and records the time at which the method is called so that the time
to complete the | 28 * arguments and records the time at which the method is called so that the time
to complete the |
| 29 * save operation can be calculated. The {@code log} method tells the builder th
at all of the data | 29 * save operation can be calculated. The {@code log} method tells the builder th
at all of the data |
| 30 * has been collected and that the resulting information should be logged. | 30 * has been collected and that the resulting information should be logged. |
| 31 * @coverage dart.engine.utilities | 31 * @coverage dart.engine.utilities |
| 32 */ | 32 */ |
| 33 class Instrumentation { | 33 class Instrumentation { |
| 34 /** | 34 /** |
| 35 * A builder that will silently ignore all data and logging requests. | 35 * A builder that will silently ignore all data and logging requests. |
| 36 */ | 36 */ |
| 37 static InstrumentationBuilder _NULL_INSTRUMENTATION_BUILDER = new Instrumentat
ionBuilder_8(); | 37 static InstrumentationBuilder _NULL_INSTRUMENTATION_BUILDER = new Instrumentat
ionBuilder_9(); |
| 38 /** | 38 /** |
| 39 * An instrumentation logger that can be used when no other instrumentation lo
gger has been | 39 * An instrumentation logger that can be used when no other instrumentation lo
gger has been |
| 40 * configured. This logger will silently ignore all data and logging requests. | 40 * configured. This logger will silently ignore all data and logging requests. |
| 41 */ | 41 */ |
| 42 static InstrumentationLogger _NULL_LOGGER = new InstrumentationLogger_9(); | 42 static InstrumentationLogger _NULL_LOGGER = new InstrumentationLogger_10(); |
| 43 /** | 43 /** |
| 44 * The current instrumentation logger. | 44 * The current instrumentation logger. |
| 45 */ | 45 */ |
| 46 static InstrumentationLogger _CURRENT_LOGGER = _NULL_LOGGER; | 46 static InstrumentationLogger _CURRENT_LOGGER = _NULL_LOGGER; |
| 47 /** | 47 /** |
| 48 * Create a builder that can collect the data associated with an operation. | 48 * Create a builder that can collect the data associated with an operation. |
| 49 * @param clazz the class performing the operation (not {@code null}) | 49 * @param clazz the class performing the operation (not {@code null}) |
| 50 * @return the builder that was created (not {@code null}) | 50 * @return the builder that was created (not {@code null}) |
| 51 */ | 51 */ |
| 52 static InstrumentationBuilder builder(Type clazz) => _CURRENT_LOGGER.createBui
lder(clazz.toString()); | 52 static InstrumentationBuilder builder(Type clazz) => _CURRENT_LOGGER.createBui
lder(clazz.toString()); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 67 */ | 67 */ |
| 68 static void set logger(InstrumentationLogger logger3) { | 68 static void set logger(InstrumentationLogger logger3) { |
| 69 _CURRENT_LOGGER = logger3 == null ? _NULL_LOGGER : logger3; | 69 _CURRENT_LOGGER = logger3 == null ? _NULL_LOGGER : logger3; |
| 70 } | 70 } |
| 71 /** | 71 /** |
| 72 * Prevent the creation of instances of this class | 72 * Prevent the creation of instances of this class |
| 73 */ | 73 */ |
| 74 Instrumentation() { | 74 Instrumentation() { |
| 75 } | 75 } |
| 76 } | 76 } |
| 77 class InstrumentationBuilder_8 implements InstrumentationBuilder { | 77 class InstrumentationBuilder_9 implements InstrumentationBuilder { |
| 78 InstrumentationBuilder data(String name, bool value) => this; | 78 InstrumentationBuilder data(String name, bool value) => this; |
| 79 InstrumentationBuilder data2(String name, int value) => this; | 79 InstrumentationBuilder data2(String name, int value) => this; |
| 80 InstrumentationBuilder data3(String name, String value) => this; | 80 InstrumentationBuilder data3(String name, String value) => this; |
| 81 InstrumentationBuilder data4(String name, List<String> value) => this; | 81 InstrumentationBuilder data4(String name, List<String> value) => this; |
| 82 InstrumentationLevel get instrumentationLevel => InstrumentationLevel.OFF; | 82 InstrumentationLevel get instrumentationLevel => InstrumentationLevel.OFF; |
| 83 void log() { | 83 void log() { |
| 84 } | 84 } |
| 85 InstrumentationBuilder metric(String name, bool value) => this; | 85 InstrumentationBuilder metric(String name, bool value) => this; |
| 86 InstrumentationBuilder metric2(String name, int value) => this; | 86 InstrumentationBuilder metric2(String name, int value) => this; |
| 87 InstrumentationBuilder metric3(String name, String value) => this; | 87 InstrumentationBuilder metric3(String name, String value) => this; |
| 88 InstrumentationBuilder metric4(String name, List<String> value) => this; | 88 InstrumentationBuilder metric4(String name, List<String> value) => this; |
| 89 } | 89 } |
| 90 class InstrumentationLogger_9 implements InstrumentationLogger { | 90 class InstrumentationLogger_10 implements InstrumentationLogger { |
| 91 InstrumentationBuilder createBuilder(String name) => Instrumentation._NULL_INS
TRUMENTATION_BUILDER; | 91 InstrumentationBuilder createBuilder(String name) => Instrumentation._NULL_INS
TRUMENTATION_BUILDER; |
| 92 } | 92 } |
| 93 /** | 93 /** |
| 94 * The interface {@code InstrumentationBuilder} defines the behavior of objects
used to collect data | 94 * The interface {@code InstrumentationBuilder} defines the behavior of objects
used to collect data |
| 95 * about an operation that has occurred and record that data through an instrume
ntation logger. | 95 * about an operation that has occurred and record that data through an instrume
ntation logger. |
| 96 * <p> | 96 * <p> |
| 97 * For an example of using objects that implement this interface, see {@link Ins
trumentation}. | 97 * For an example of using objects that implement this interface, see {@link Ins
trumentation}. |
| 98 * @coverage dart.engine.utilities | 98 * @coverage dart.engine.utilities |
| 99 */ | 99 */ |
| 100 abstract class InstrumentationBuilder { | 100 abstract class InstrumentationBuilder { |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 */ | 230 */ |
| 231 abstract class InstrumentationLogger { | 231 abstract class InstrumentationLogger { |
| 232 /** | 232 /** |
| 233 * Create a builder that can collect the data associated with an operation ide
ntified by the given | 233 * Create a builder that can collect the data associated with an operation ide
ntified by the given |
| 234 * name. | 234 * name. |
| 235 * @param name the name used to uniquely identify the operation | 235 * @param name the name used to uniquely identify the operation |
| 236 * @return the builder that was created | 236 * @return the builder that was created |
| 237 */ | 237 */ |
| 238 InstrumentationBuilder createBuilder(String name); | 238 InstrumentationBuilder createBuilder(String name); |
| 239 } | 239 } |
| OLD | NEW |