diff --git a/packages/flutter_tools/lib/src/commands/analyze.dart b/packages/flutter_tools/lib/src/commands/analyze.dart index ef1fc65aa3..be5078a4e8 100644 --- a/packages/flutter_tools/lib/src/commands/analyze.dart +++ b/packages/flutter_tools/lib/src/commands/analyze.dart @@ -118,15 +118,8 @@ class AnalyzeCommand extends FlutterCommand { 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 @@ class AnalyzeCommand extends FlutterCommand { void _writeBenchmark(Stopwatch stopwatch, int errorCount) { final String benchmarkOut = 'analysis_benchmark.json'; - String expectedTime = argResults['benchmark-expected']; - Map data = { '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 2d9d5f7772..9dbebed3ee 100644 --- a/packages/flutter_tools/lib/src/device.dart +++ b/packages/flutter_tools/lib/src/device.dart @@ -57,7 +57,7 @@ class DeviceManager { devices = devices.where((Device device) { return (device.id.toLowerCase().startsWith(deviceId) || device.name.toLowerCase().startsWith(deviceId)); - }); + }).toList(); return devices.length == 1 ? devices.first : null; }