Commit a9993664 authored by Devon Carew's avatar Devon Carew

remove the analyze --benhcmark-expected option (#3755)

parent 2592f8f4
......@@ -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<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.');
}
}
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment