Add CustomDimensions.commandRunIsTest (#124135)
This commit is contained in:
committed by
GitHub
parent
0cfcdeec89
commit
daaa32bc06
@@ -498,6 +498,7 @@ class RunCommand extends RunCommandBase {
|
||||
commandRunAndroidEmbeddingVersion: androidEmbeddingVersion,
|
||||
commandRunEnableImpeller: enableImpeller.asBool,
|
||||
commandRunIOSInterfaceType: iOSInterfaceType,
|
||||
commandRunIsTest: targetFile.endsWith('_test.dart'),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ class CustomDimensions {
|
||||
this.hotEventReloadVMTimeInMs,
|
||||
this.commandRunEnableImpeller,
|
||||
this.commandRunIOSInterfaceType,
|
||||
this.commandRunIsTest,
|
||||
});
|
||||
|
||||
final String? sessionHostOsDetails; // cd1
|
||||
@@ -127,6 +128,7 @@ class CustomDimensions {
|
||||
final int? hotEventReloadVMTimeInMs; // cd 55
|
||||
final bool? commandRunEnableImpeller; // cd 56
|
||||
final String? commandRunIOSInterfaceType; // cd 57
|
||||
final bool? commandRunIsTest; // cd 58
|
||||
|
||||
/// Convert to a map that will be used to upload to the analytics backend.
|
||||
Map<String, String> toMap() => <String, String>{
|
||||
@@ -187,6 +189,7 @@ class CustomDimensions {
|
||||
if (hotEventReloadVMTimeInMs != null) cdKey(CustomDimensionsEnum.hotEventReloadVMTimeInMs): hotEventReloadVMTimeInMs.toString(),
|
||||
if (commandRunEnableImpeller != null) cdKey(CustomDimensionsEnum.commandRunEnableImpeller): commandRunEnableImpeller.toString(),
|
||||
if (commandRunIOSInterfaceType != null) cdKey(CustomDimensionsEnum.commandRunIOSInterfaceType): commandRunIOSInterfaceType.toString(),
|
||||
if (commandRunIsTest != null) cdKey(CustomDimensionsEnum.commandRunIsTest): commandRunIsTest.toString(),
|
||||
};
|
||||
|
||||
/// Merge the values of two [CustomDimensions] into one. If a value is defined
|
||||
@@ -254,6 +257,7 @@ class CustomDimensions {
|
||||
hotEventReloadVMTimeInMs: other.hotEventReloadVMTimeInMs ?? hotEventReloadVMTimeInMs,
|
||||
commandRunEnableImpeller: other.commandRunEnableImpeller ?? commandRunEnableImpeller,
|
||||
commandRunIOSInterfaceType: other.commandRunIOSInterfaceType ?? commandRunIOSInterfaceType,
|
||||
commandRunIsTest: other.commandRunIsTest ?? commandRunIsTest,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -315,6 +319,7 @@ class CustomDimensions {
|
||||
hotEventReloadVMTimeInMs: _extractInt(map, CustomDimensionsEnum.hotEventReloadVMTimeInMs),
|
||||
commandRunEnableImpeller: _extractBool(map, CustomDimensionsEnum.commandRunEnableImpeller),
|
||||
commandRunIOSInterfaceType: _extractString(map, CustomDimensionsEnum.commandRunIOSInterfaceType),
|
||||
commandRunIsTest: _extractBool(map, CustomDimensionsEnum.commandRunIsTest),
|
||||
);
|
||||
|
||||
static bool? _extractBool(Map<String, String> map, CustomDimensionsEnum field) =>
|
||||
@@ -402,6 +407,7 @@ enum CustomDimensionsEnum {
|
||||
hotEventReloadVMTimeInMs, // cd55
|
||||
commandRunEnableImpeller, // cd56
|
||||
commandRunIOSInterfaceType, // cd57
|
||||
commandRunIsTest, // cd58
|
||||
}
|
||||
|
||||
String cdKey(CustomDimensionsEnum cd) => 'cd${cd.index + 1}';
|
||||
|
||||
Reference in New Issue
Block a user