| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.instrumentation; | 8 library engine.instrumentation; |
| 9 | 9 |
| 10 import 'java_core.dart'; | 10 import 'java_core.dart'; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * <b>Example</b> | 24 * <b>Example</b> |
| 25 * | 25 * |
| 26 * To collect metrics about how long it took to save a file, you would write som
ething like the | 26 * To collect metrics about how long it took to save a file, you would write som
ething like the |
| 27 * following: | 27 * following: |
| 28 * | 28 * |
| 29 * <pre> | 29 * <pre> |
| 30 * InstrumentationBuilder instrumentation = Instrumentation.builder(this.getClas
s()); | 30 * InstrumentationBuilder instrumentation = Instrumentation.builder(this.getClas
s()); |
| 31 * // save the file | 31 * // save the file |
| 32 * instrumentation.metric("chars", fileLength).log(); | 32 * instrumentation.metric("chars", fileLength).log(); |
| 33 * </pre> | 33 * </pre> |
| 34 * The `Instrumentation.builder` method creates a new [InstrumentationBuilder | 34 * The `Instrumentation.builder` method creates a new [InstrumentationBuilder] |
| 35 ] and records the time at which it was created. The | 35 * and records the time at which it was created. The |
| 36 * [InstrumentationBuilder#metric] appends the information specified by the | 36 * [InstrumentationBuilder.metric] appends the information specified by the |
| 37 * arguments and records the time at which the method is called so that the time
to complete the | 37 * arguments and records the time at which the method is called so that the time
to complete the |
| 38 * save operation can be calculated. The `log` method tells the builder that all
of the data | 38 * save operation can be calculated. The `log` method tells the builder that all
of the data |
| 39 * has been collected and that the resulting information should be logged. | 39 * has been collected and that the resulting information should be logged. |
| 40 */ | 40 */ |
| 41 class Instrumentation { | 41 class Instrumentation { |
| 42 /** | 42 /** |
| 43 * A builder that will silently ignore all data and logging requests. | 43 * A builder that will silently ignore all data and logging requests. |
| 44 */ | 44 */ |
| 45 static InstrumentationBuilder _NULL_INSTRUMENTATION_BUILDER = new Instrumentat
ionBuilder_Instrumentation_NULL_INSTRUMENTATION_BUILDER(); | 45 static InstrumentationBuilder _NULL_INSTRUMENTATION_BUILDER = new Instrumentat
ionBuilder_Instrumentation_NULL_INSTRUMENTATION_BUILDER(); |
| 46 | 46 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 * | 148 * |
| 149 * @param name the name used to identify the data | 149 * @param name the name used to identify the data |
| 150 * @param value the value of the data to be collected | 150 * @param value the value of the data to be collected |
| 151 * @return this builder | 151 * @return this builder |
| 152 */ | 152 */ |
| 153 InstrumentationBuilder data4(String name, List<String> value); | 153 InstrumentationBuilder data4(String name, List<String> value); |
| 154 | 154 |
| 155 /** | 155 /** |
| 156 * Answer the [InstrumentationLevel] of this `InstrumentationBuilder`. | 156 * Answer the [InstrumentationLevel] of this `InstrumentationBuilder`. |
| 157 * | 157 * |
| 158 * @return one of [InstrumentationLevel#EVERYTHING], [InstrumentationLevel#MET
RICS], | 158 * @return one of [InstrumentationLevel.EVERYTHING], [InstrumentationLevel.MET
RICS], |
| 159 * [InstrumentationLevel#OFF] | 159 * [InstrumentationLevel.OFF] |
| 160 */ | 160 */ |
| 161 InstrumentationLevel get instrumentationLevel; | 161 InstrumentationLevel get instrumentationLevel; |
| 162 | 162 |
| 163 /** | 163 /** |
| 164 * Log the data that has been collected. The instrumentation builder should no
t be used after this | 164 * Log the data that has been collected. The instrumentation builder should no
t be used after this |
| 165 * method is invoked. The behavior of any method defined on this interface tha
t is used after this | 165 * method is invoked. The behavior of any method defined on this interface tha
t is used after this |
| 166 * method is invoked is undefined. | 166 * method is invoked is undefined. |
| 167 */ | 167 */ |
| 168 void log(); | 168 void log(); |
| 169 | 169 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 * @param name the name used to uniquely identify the operation | 319 * @param name the name used to uniquely identify the operation |
| 320 * @return the builder that was created | 320 * @return the builder that was created |
| 321 */ | 321 */ |
| 322 InstrumentationBuilder createBuilder(String name); | 322 InstrumentationBuilder createBuilder(String name); |
| 323 } | 323 } |
| 324 | 324 |
| 325 class InstrumentationLogger_Instrumentation_NULL_LOGGER implements Instrumentati
onLogger { | 325 class InstrumentationLogger_Instrumentation_NULL_LOGGER implements Instrumentati
onLogger { |
| 326 @override | 326 @override |
| 327 InstrumentationBuilder createBuilder(String name) => Instrumentation._NULL_INS
TRUMENTATION_BUILDER; | 327 InstrumentationBuilder createBuilder(String name) => Instrumentation._NULL_INS
TRUMENTATION_BUILDER; |
| 328 } | 328 } |
| OLD | NEW |