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_16(); | 41 static final InstrumentationBuilder nullBuilder = new InstrumentationBuilder_1
6(); |
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_17(); | 47 static InstrumentationLogger _NULL_LOGGER = new InstrumentationLogger_17(); |
48 | 48 |
49 /** | 49 /** |
50 * The current instrumentation logger. | 50 * The current instrumentation logger. |
51 */ | 51 */ |
(...skipping 14 matching lines...) Expand all Loading... |
66 * @return the builder that was created (not `null`) | 66 * @return the builder that was created (not `null`) |
67 */ | 67 */ |
68 static InstrumentationBuilder builder2(String name) => _CURRENT_LOGGER.createB
uilder(name); | 68 static InstrumentationBuilder builder2(String name) => _CURRENT_LOGGER.createB
uilder(name); |
69 | 69 |
70 /** | 70 /** |
71 * Get the currently active instrumentation logger | 71 * Get the currently active instrumentation logger |
72 */ | 72 */ |
73 static InstrumentationLogger get logger => _CURRENT_LOGGER; | 73 static InstrumentationLogger get logger => _CURRENT_LOGGER; |
74 | 74 |
75 /** | 75 /** |
76 * Return a builder that will silently ignore all data and logging requests. | |
77 * | |
78 * @return the builder (not `null`) | |
79 */ | |
80 static InstrumentationBuilder get nullBuilder => _NULL_INSTRUMENTATION_BUILDER
; | |
81 | |
82 /** | |
83 * Is this instrumentation system currently configured to drop instrumentation
data provided to | 76 * Is this instrumentation system currently configured to drop instrumentation
data provided to |
84 * it? | 77 * it? |
85 * | 78 * |
86 * @return | 79 * @return |
87 */ | 80 */ |
88 static bool get isNullLogger => identical(_CURRENT_LOGGER, _NULL_LOGGER); | 81 static bool get isNullLogger => identical(_CURRENT_LOGGER, _NULL_LOGGER); |
89 | 82 |
90 /** | 83 /** |
91 * Set the logger that should receive instrumentation information to the given
logger. | 84 * Set the logger that should receive instrumentation information to the given
logger. |
92 * | 85 * |
(...skipping 13 matching lines...) Expand all Loading... |
106 } | 99 } |
107 void log2(int minTimeToLong) { | 100 void log2(int minTimeToLong) { |
108 } | 101 } |
109 InstrumentationBuilder metric(String name, bool value) => this; | 102 InstrumentationBuilder metric(String name, bool value) => this; |
110 InstrumentationBuilder metric2(String name, int value) => this; | 103 InstrumentationBuilder metric2(String name, int value) => this; |
111 InstrumentationBuilder metric3(String name, String value) => this; | 104 InstrumentationBuilder metric3(String name, String value) => this; |
112 InstrumentationBuilder metric4(String name, List<String> value) => this; | 105 InstrumentationBuilder metric4(String name, List<String> value) => this; |
113 InstrumentationBuilder record(Exception exception) => this; | 106 InstrumentationBuilder record(Exception exception) => this; |
114 } | 107 } |
115 class InstrumentationLogger_17 implements InstrumentationLogger { | 108 class InstrumentationLogger_17 implements InstrumentationLogger { |
116 InstrumentationBuilder createBuilder(String name) => Instrumentation._NULL_INS
TRUMENTATION_BUILDER; | 109 InstrumentationBuilder createBuilder(String name) => Instrumentation.nullBuild
er; |
117 } | 110 } |
118 /** | 111 /** |
119 * The interface `InstrumentationBuilder` defines the behavior of objects used t
o collect data | 112 * 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. | 113 * about an operation that has occurred and record that data through an instrume
ntation logger. |
121 * | 114 * |
122 * For an example of using objects that implement this interface, see [Instrumen
tation]. | 115 * For an example of using objects that implement this interface, see [Instrumen
tation]. |
123 * | 116 * |
124 * @coverage dart.engine.utilities | 117 * @coverage dart.engine.utilities |
125 */ | 118 */ |
126 abstract class InstrumentationBuilder { | 119 abstract class InstrumentationBuilder { |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 285 |
293 /** | 286 /** |
294 * Create a builder that can collect the data associated with an operation ide
ntified by the given | 287 * Create a builder that can collect the data associated with an operation ide
ntified by the given |
295 * name. | 288 * name. |
296 * | 289 * |
297 * @param name the name used to uniquely identify the operation | 290 * @param name the name used to uniquely identify the operation |
298 * @return the builder that was created | 291 * @return the builder that was created |
299 */ | 292 */ |
300 InstrumentationBuilder createBuilder(String name); | 293 InstrumentationBuilder createBuilder(String name); |
301 } | 294 } |
OLD | NEW |