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

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

Issue 1358243005: rename analysis_timing_test => .. _tests (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | pkg/analysis_server/benchmark/perf/analysis_timing_tests.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library server.performance.analysis.timing;
6
7 import 'dart:async';
8 import 'dart:io';
9
10 import 'package:args/args.dart';
11 import 'package:test_reflective_loader/test_reflective_loader.dart';
12
13 import '../../test/utils.dart';
14 import 'performance_tests.dart';
15
16 const String SOURCE_OPTION = 'source';
17
18 /**
19 * Pass in the directory of the source to be analyzed as option --source
20 */
21 main(List<String> arguements) {
22 initializeTestEnvironment();
23 ArgParser parser = _createArgParser();
24 var args = parser.parse(arguements);
25 if (args[SOURCE_OPTION] == null) {
26 print('path to source directory must be specified');
27 exit(1);
28 }
29 source = args[SOURCE_OPTION];
30 defineReflectiveTests(AnalysisTimingIntegrationTest);
31 }
32
33 String source;
34
35 @reflectiveTest
36 class AnalysisTimingIntegrationTest
37 extends AbstractAnalysisServerPerformanceTest {
38 test_detect_analysis_done() {
39 sourceDirectory = new Directory(source);
40 subscribeToStatusNotifications();
41 return _runAndTimeAnalysis();
42 }
43
44 Future _runAndTimeAnalysis() {
45 stopwatch.start();
46 setAnalysisRoot();
47 return analysisFinished.then((_) {
48 print('analysis completed in ${stopwatch.elapsed}');
49 stopwatch.reset();
50 });
51 }
52 }
53
54 ArgParser _createArgParser() {
55 ArgParser parser = new ArgParser();
56 parser.addOption('source',
57 help: 'full path to source directory for analysis');
58 return parser;
59 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/benchmark/perf/analysis_timing_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698