Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Side by Side Diff: pkg/analysis_server/benchmark/perf/completion_timing_tests.dart

Issue 2402483002: Remove 'initializeTestEnvironment' from 'analysis_server'. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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:args/args.dart'; 10 import 'package:args/args.dart';
11 import 'package:test/test.dart'; 11 import 'package:test/test.dart';
12 12
13 import '../../test/utils.dart';
14 import 'performance_tests.dart'; 13 import 'performance_tests.dart';
15 14
16 /** 15 /**
17 * Pass in the directory of the source to be analyzed as option `--source`, 16 * Pass in the directory of the source to be analyzed as option `--source`,
18 * specify a priority file with `--priority` and an offset for completions 17 * specify a priority file with `--priority` and an offset for completions
19 * with a `--offset`. 18 * with a `--offset`.
20 */ 19 */
21 main(List<String> arguments) { 20 main(List<String> arguments) {
22 initializeTestEnvironment();
23 ArgParser parser = _createArgParser(); 21 ArgParser parser = _createArgParser();
24 var args = parser.parse(arguments); 22 var args = parser.parse(arguments);
25 if (args[SOURCE_OPTION] == null) { 23 if (args[SOURCE_OPTION] == null) {
26 print('path to source directory must be specified'); 24 print('path to source directory must be specified');
27 exit(1); 25 exit(1);
28 } 26 }
29 source = args[SOURCE_OPTION]; 27 source = args[SOURCE_OPTION];
30 priorityFile = args[PRIORITY_FILE_OPTION]; 28 priorityFile = args[PRIORITY_FILE_OPTION];
31 offset = int.parse(args[COMPLETION_OFFSET]); 29 offset = int.parse(args[COMPLETION_OFFSET]);
32 30
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 sendAnalysisSetPriorityFiles([priorityFile]); 73 sendAnalysisSetPriorityFiles([priorityFile]);
76 sendCompletionGetSuggestions(priorityFile, offset); 74 sendCompletionGetSuggestions(priorityFile, offset);
77 75
78 await analysisFinished; 76 await analysisFinished;
79 77
80 print('analysis completed in ${stopwatch.elapsed}'); 78 print('analysis completed in ${stopwatch.elapsed}');
81 print('completion received at : $timings'); 79 print('completion received at : $timings');
82 await shutdown(); 80 await shutdown();
83 } 81 }
84 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698