| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library server.performance.analysis.timing; | 5 library server.performance.analysis.timing; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 10 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 main(List<String> arguments) { | 23 main(List<String> arguments) { |
| 24 initializeTestEnvironment(); | 24 initializeTestEnvironment(); |
| 25 ArgParser parser = _createArgParser(); | 25 ArgParser parser = _createArgParser(); |
| 26 var args = parser.parse(arguments); | 26 var args = parser.parse(arguments); |
| 27 if (args[SOURCE_OPTION] == null) { | 27 if (args[SOURCE_OPTION] == null) { |
| 28 print('path to source directory must be specified'); | 28 print('path to source directory must be specified'); |
| 29 exit(1); | 29 exit(1); |
| 30 } | 30 } |
| 31 source = args[SOURCE_OPTION]; | 31 source = args[SOURCE_OPTION]; |
| 32 priorityFile = args[PRIORITY_FILE_OPTION]; | 32 priorityFile = args[PRIORITY_FILE_OPTION]; |
| 33 metricNames.addAll(args[METRIC_NAME_OPTION]); | 33 List names = args[METRIC_NAME_OPTION] as List; |
| 34 for (var name in names) { |
| 35 metricNames.add(name as String); |
| 36 } |
| 34 unittestConfiguration.timeout = new Duration(minutes: 20); | 37 unittestConfiguration.timeout = new Duration(minutes: 20); |
| 35 | 38 |
| 36 var test; | 39 var test; |
| 37 | 40 |
| 38 if (metricNames.isEmpty) { | 41 if (metricNames.isEmpty) { |
| 39 test = new AnalysisTimingTest(); | 42 test = new AnalysisTimingTest(); |
| 40 } else { | 43 } else { |
| 41 test = new SubscriptionTimingTest(); | 44 test = new SubscriptionTimingTest(); |
| 42 } | 45 } |
| 43 | 46 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 158 |
| 156 sendAnalysisSetPriorityFiles([priorityFile]); | 159 sendAnalysisSetPriorityFiles([priorityFile]); |
| 157 | 160 |
| 158 await analysisFinished; | 161 await analysisFinished; |
| 159 print('analysis completed in ${stopwatch.elapsed}'); | 162 print('analysis completed in ${stopwatch.elapsed}'); |
| 160 metrics.forEach((Metric m) => print('${m.name} timings: ${m.timings}')); | 163 metrics.forEach((Metric m) => print('${m.name} timings: ${m.timings}')); |
| 161 | 164 |
| 162 await shutdown(); | 165 await shutdown(); |
| 163 } | 166 } |
| 164 } | 167 } |
| OLD | NEW |