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

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

Issue 1419503002: refactor timing tests to not use the test framework (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: remove unused code 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/completion_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 import 'dart:io';
8 9
9 import 'package:analysis_server/plugin/protocol/protocol.dart'; 10 import 'package:analysis_server/plugin/protocol/protocol.dart';
10 import 'package:unittest/unittest.dart'; 11 import 'package:unittest/unittest.dart';
11 12
12 import '../../test/integration/integration_tests.dart'; 13 import '../../test/integration/integration_tests.dart';
13 14
14 /** 15 /**
15 * Base class for analysis server performance tests. 16 * Base class for analysis server performance tests.
16 */ 17 */
17 abstract class AbstractAnalysisServerPerformanceTest 18 abstract class AbstractAnalysisServerPerformanceTest
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 */ 61 */
61 Future subscribeToStatusNotifications() { 62 Future subscribeToStatusNotifications() {
62 List<Future> futures = <Future>[]; 63 List<Future> futures = <Future>[];
63 futures.add(sendServerSetSubscriptions([ServerService.STATUS])); 64 futures.add(sendServerSetSubscriptions([ServerService.STATUS]));
64 return Future.wait(futures); 65 return Future.wait(futures);
65 } 66 }
66 67
67 /** 68 /**
68 * After every test, the server is stopped. 69 * After every test, the server is stopped.
69 */ 70 */
70 @override 71 Future shutdown() async => await shutdownIfNeeded();
71 Future tearDown() => shutdownIfNeeded();
72 } 72 }
73
74 class AbstractTimingTest extends AbstractAnalysisServerPerformanceTest {
75 Future init(String source) async {
76 await super.setUp();
77 sourceDirectory = new Directory(source);
78 return subscribeToStatusNotifications();
79 }
80 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/benchmark/perf/completion_timing_tests.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698