remove the analyze --benhcmark-expected option (#3755)
diff --git a/packages/flutter_tools/lib/src/commands/analyze.dart b/packages/flutter_tools/lib/src/commands/analyze.dart
index ef1fc65..be5078a 100644
--- a/packages/flutter_tools/lib/src/commands/analyze.dart
+++ b/packages/flutter_tools/lib/src/commands/analyze.dart
@@ -118,15 +118,8 @@
argParser.addFlag('watch', help: 'Run analysis continuously, watching the filesystem for changes.', negatable: false);
argParser.addOption('dart-sdk', help: 'The path to the Dart SDK.', hide: true);
- // Options to enable a benchmarking mode.
- argParser.addFlag('benchmark',
- negatable: false,
- hide: true
- );
- argParser.addOption('benchmark-expected',
- hide: true,
- help: 'The time (in seconds) that the benchmark is expected to run.'
- );
+ // Hidden option to enable a benchmarking mode.
+ argParser.addFlag('benchmark', negatable: false, hide: true);
usesPubOption();
}
@@ -577,19 +570,12 @@
void _writeBenchmark(Stopwatch stopwatch, int errorCount) {
final String benchmarkOut = 'analysis_benchmark.json';
- String expectedTime = argResults['benchmark-expected'];
-
Map<String, dynamic> data = <String, dynamic>{
'time': (stopwatch.elapsedMilliseconds / 1000.0),
'issues': errorCount
};
-
- if (expectedTime != null)
- data['expected'] = expectedTime;
-
JsonEncoder encoder = new JsonEncoder.withIndent(' ');
new File(benchmarkOut).writeAsStringSync(encoder.convert(data) + '\n');
-
printStatus('Analysis benchmark written to $benchmarkOut.');
}
}
diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart
index 2d9d5f7..9dbebed 100644
--- a/packages/flutter_tools/lib/src/device.dart
+++ b/packages/flutter_tools/lib/src/device.dart
@@ -57,7 +57,7 @@
devices = devices.where((Device device) {
return (device.id.toLowerCase().startsWith(deviceId) ||
device.name.toLowerCase().startsWith(deviceId));
- });
+ }).toList();
return devices.length == 1 ? devices.first : null;
}