Index: pkg/analyzer/lib/src/generated/instrumentation.dart |
diff --git a/pkg/analyzer/lib/src/generated/instrumentation.dart b/pkg/analyzer/lib/src/generated/instrumentation.dart |
index 918c0ff4d766331d72b3843244739a93e5f10956..54e478918a3694951b21257fa29cf76f3c2daaa6 100644 |
--- a/pkg/analyzer/lib/src/generated/instrumentation.dart |
+++ b/pkg/analyzer/lib/src/generated/instrumentation.dart |
@@ -42,13 +42,15 @@ class Instrumentation { |
/** |
* A builder that will silently ignore all data and logging requests. |
*/ |
- static InstrumentationBuilder _NULL_INSTRUMENTATION_BUILDER = new InstrumentationBuilder_Instrumentation_NULL_INSTRUMENTATION_BUILDER(); |
+ static InstrumentationBuilder _NULL_INSTRUMENTATION_BUILDER = |
+ new InstrumentationBuilder_Instrumentation_NULL_INSTRUMENTATION_BUILDER(); |
/** |
* An instrumentation logger that can be used when no other instrumentation logger has been |
* configured. This logger will silently ignore all data and logging requests. |
*/ |
- static InstrumentationLogger _NULL_LOGGER = new InstrumentationLogger_Instrumentation_NULL_LOGGER(); |
+ static InstrumentationLogger _NULL_LOGGER = |
+ new InstrumentationLogger_Instrumentation_NULL_LOGGER(); |
/** |
* The current instrumentation logger. |
@@ -56,49 +58,52 @@ class Instrumentation { |
static InstrumentationLogger _CURRENT_LOGGER = _NULL_LOGGER; |
/** |
- * Create a builder that can collect the data associated with an operation. |
+ * Is this instrumentation system currently configured to drop instrumentation data provided to |
+ * it? |
* |
- * @param clazz the class performing the operation (not `null`) |
- * @return the builder that was created (not `null`) |
+ * @return |
*/ |
- static InstrumentationBuilder builder(Type clazz) => _CURRENT_LOGGER.createBuilder(clazz.toString()); |
+ static bool get isNullLogger => identical(_CURRENT_LOGGER, _NULL_LOGGER); |
/** |
- * Create a builder that can collect the data associated with an operation. |
- * |
- * @param name the name used to uniquely identify the operation (not `null`) |
- * @return the builder that was created (not `null`) |
+ * Get the currently active instrumentation logger |
*/ |
- static InstrumentationBuilder builder2(String name) => _CURRENT_LOGGER.createBuilder(name); |
+ static InstrumentationLogger get logger => _CURRENT_LOGGER; |
/** |
- * Get the currently active instrumentation logger |
+ * Set the logger that should receive instrumentation information to the given logger. |
+ * |
+ * @param logger the logger that should receive instrumentation information |
*/ |
- static InstrumentationLogger get logger => _CURRENT_LOGGER; |
+ static void set logger(InstrumentationLogger logger) { |
+ _CURRENT_LOGGER = logger == null ? _NULL_LOGGER : logger; |
+ } |
/** |
* Return a builder that will silently ignore all data and logging requests. |
* |
* @return the builder (not `null`) |
*/ |
- static InstrumentationBuilder get nullBuilder => _NULL_INSTRUMENTATION_BUILDER; |
+ static InstrumentationBuilder get nullBuilder => |
+ _NULL_INSTRUMENTATION_BUILDER; |
/** |
- * Is this instrumentation system currently configured to drop instrumentation data provided to |
- * it? |
+ * Create a builder that can collect the data associated with an operation. |
* |
- * @return |
+ * @param clazz the class performing the operation (not `null`) |
+ * @return the builder that was created (not `null`) |
*/ |
- static bool get isNullLogger => identical(_CURRENT_LOGGER, _NULL_LOGGER); |
+ static InstrumentationBuilder builder(Type clazz) => |
+ _CURRENT_LOGGER.createBuilder(clazz.toString()); |
/** |
- * Set the logger that should receive instrumentation information to the given logger. |
+ * Create a builder that can collect the data associated with an operation. |
* |
- * @param logger the logger that should receive instrumentation information |
+ * @param name the name used to uniquely identify the operation (not `null`) |
+ * @return the builder that was created (not `null`) |
*/ |
- static void set logger(InstrumentationLogger logger) { |
- _CURRENT_LOGGER = logger == null ? _NULL_LOGGER : logger; |
- } |
+ static InstrumentationBuilder builder2(String name) => |
+ _CURRENT_LOGGER.createBuilder(name); |
} |
/** |
@@ -109,6 +114,14 @@ class Instrumentation { |
*/ |
abstract class InstrumentationBuilder { |
/** |
+ * Answer the [InstrumentationLevel] of this `InstrumentationBuilder`. |
+ * |
+ * @return one of [InstrumentationLevel.EVERYTHING], [InstrumentationLevel.METRICS], |
+ * [InstrumentationLevel.OFF] |
+ */ |
+ InstrumentationLevel get instrumentationLevel; |
+ |
+ /** |
* Append the given data to the data being collected by this builder. The information is declared |
* to potentially contain data that is either user identifiable or contains user intellectual |
* property (but is not guaranteed to contain either). |
@@ -153,14 +166,6 @@ abstract class InstrumentationBuilder { |
InstrumentationBuilder data4(String name, List<String> value); |
/** |
- * Answer the [InstrumentationLevel] of this `InstrumentationBuilder`. |
- * |
- * @return one of [InstrumentationLevel.EVERYTHING], [InstrumentationLevel.METRICS], |
- * [InstrumentationLevel.OFF] |
- */ |
- InstrumentationLevel get instrumentationLevel; |
- |
- /** |
* Log the data that has been collected. The instrumentation builder should not be used after this |
* method is invoked. The behavior of any method defined on this interface that is used after this |
* method is invoked is undefined. |
@@ -232,7 +237,11 @@ abstract class InstrumentationBuilder { |
InstrumentationBuilder record(Exception exception); |
} |
-class InstrumentationBuilder_Instrumentation_NULL_INSTRUMENTATION_BUILDER implements InstrumentationBuilder { |
+class InstrumentationBuilder_Instrumentation_NULL_INSTRUMENTATION_BUILDER |
+ implements InstrumentationBuilder { |
+ @override |
+ InstrumentationLevel get instrumentationLevel => InstrumentationLevel.OFF; |
+ |
@override |
InstrumentationBuilder data(String name, bool value) => this; |
@@ -246,9 +255,6 @@ class InstrumentationBuilder_Instrumentation_NULL_INSTRUMENTATION_BUILDER implem |
InstrumentationBuilder data4(String name, List<String> value) => this; |
@override |
- InstrumentationLevel get instrumentationLevel => InstrumentationLevel.OFF; |
- |
- @override |
void log() { |
} |
@@ -279,15 +285,22 @@ class InstrumentationBuilder_Instrumentation_NULL_INSTRUMENTATION_BUILDER implem |
*/ |
class InstrumentationLevel extends Enum<InstrumentationLevel> { |
/** Recording all instrumented information */ |
- static const InstrumentationLevel EVERYTHING = const InstrumentationLevel('EVERYTHING', 0); |
+ static const InstrumentationLevel EVERYTHING = |
+ const InstrumentationLevel('EVERYTHING', 0); |
/** Recording only metrics */ |
- static const InstrumentationLevel METRICS = const InstrumentationLevel('METRICS', 1); |
+ static const InstrumentationLevel METRICS = |
+ const InstrumentationLevel('METRICS', 1); |
/** Nothing recorded */ |
static const InstrumentationLevel OFF = const InstrumentationLevel('OFF', 2); |
- static const List<InstrumentationLevel> values = const [EVERYTHING, METRICS, OFF]; |
+ static const List<InstrumentationLevel> values = const [ |
+ EVERYTHING, |
+ METRICS, |
+ OFF]; |
+ |
+ const InstrumentationLevel(String name, int ordinal) : super(name, ordinal); |
static InstrumentationLevel fromString(String str) { |
if (str == "EVERYTHING") { |
@@ -301,8 +314,6 @@ class InstrumentationLevel extends Enum<InstrumentationLevel> { |
} |
throw new IllegalArgumentException("Unrecognised InstrumentationLevel"); |
} |
- |
- const InstrumentationLevel(String name, int ordinal) : super(name, ordinal); |
} |
/** |
@@ -322,7 +333,9 @@ abstract class InstrumentationLogger { |
InstrumentationBuilder createBuilder(String name); |
} |
-class InstrumentationLogger_Instrumentation_NULL_LOGGER implements InstrumentationLogger { |
+class InstrumentationLogger_Instrumentation_NULL_LOGGER implements |
+ InstrumentationLogger { |
@override |
- InstrumentationBuilder createBuilder(String name) => Instrumentation._NULL_INSTRUMENTATION_BUILDER; |
-} |
+ InstrumentationBuilder createBuilder(String name) => |
+ Instrumentation._NULL_INSTRUMENTATION_BUILDER; |
+} |