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

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

Issue 1386003002: Benchmarking for navigation results. (Closed) Base URL: git@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 | « pkg/analysis_server/benchmark/perf/analysis_timing_tests.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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; 5 library server.performance;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol.dart'; 9 import 'package:analysis_server/src/protocol.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
11 11
12 import '../../test/integration/integration_tests.dart'; 12 import '../../test/integration/integration_tests.dart';
13 13
14 /** 14 /**
15 * Base class for analysis server performance tests. 15 * Base class for analysis server performance tests.
16 */ 16 */
17 abstract class AbstractAnalysisServerPerformanceTest 17 abstract class AbstractAnalysisServerPerformanceTest
18 extends AbstractAnalysisServerIntegrationTest { 18 extends AbstractAnalysisServerIntegrationTest {
19 /** 19 /**
20 * Stopwatch for timing results; 20 * Stopwatch for timing results;
21 */ 21 */
22 Stopwatch stopwatch = new Stopwatch(); 22 Stopwatch stopwatch = new Stopwatch();
23 23
24 /** 24 /**
25 * Send the server an 'analysis.setAnalysisRoots' command directing it to 25 * Send the server an 'analysis.setAnalysisRoots' command directing it to
26 * analyze [sourceDirectory]. 26 * analyze [sourceDirectory].
27 */ 27 */
28 Future setAnalysisRoot() { 28 Future setAnalysisRoot() =>
29 return sendAnalysisSetAnalysisRoots([sourceDirectory.path], []); 29 sendAnalysisSetAnalysisRoots([sourceDirectory.path], []);
30 }
31 30
32 /** 31 /**
33 * Enable [SERVER_STATUS] notifications so that [analysisFinished] 32 * Enable [SERVER_STATUS] notifications so that [analysisFinished]
34 * can be used. 33 * can be used.
35 */ 34 */
36 Future subscribeToStatusNotifications() { 35 Future subscribeToStatusNotifications() {
37 List<Future> futures = <Future>[]; 36 List<Future> futures = <Future>[];
38 futures.add(sendServerSetSubscriptions([ServerService.STATUS])); 37 futures.add(sendServerSetSubscriptions([ServerService.STATUS]));
39 return Future.wait(futures); 38 return Future.wait(futures);
40 } 39 }
(...skipping 21 matching lines...) Expand all
62 skipShutdown = true; 61 skipShutdown = true;
63 }); 62 });
64 return serverConnected.future; 63 return serverConnected.future;
65 }); 64 });
66 } 65 }
67 66
68 /** 67 /**
69 * After every test, the server is stopped. 68 * After every test, the server is stopped.
70 */ 69 */
71 @override 70 @override
72 Future tearDown() { 71 Future tearDown() => shutdownIfNeeded();
73 return shutdownIfNeeded();
74 }
75 } 72 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/benchmark/perf/analysis_timing_tests.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698