OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 test.timing; | |
6 | |
7 import 'dart:async'; | 5 import 'dart:async'; |
8 import 'dart:io'; | 6 import 'dart:io'; |
9 import 'dart:math'; | 7 import 'dart:math'; |
10 | 8 |
11 import 'package:path/path.dart'; | 9 import 'package:path/path.dart'; |
12 | 10 |
13 import '../integration/integration_test_methods.dart'; | 11 import '../integration/support/integration_test_methods.dart'; |
14 import '../integration/integration_tests.dart'; | 12 import '../integration/support/integration_tests.dart'; |
15 | 13 |
16 /** | 14 /** |
17 * Instances of the class [TimingResult] represent the timing information | 15 * Instances of the class [TimingResult] represent the timing information |
18 * gathered while executing a given timing test. | 16 * gathered while executing a given timing test. |
19 */ | 17 */ |
20 class TimingResult { | 18 class TimingResult { |
21 /** | 19 /** |
22 * The number of nanoseconds in a millisecond. | 20 * The number of nanoseconds in a millisecond. |
23 */ | 21 */ |
24 static int NANOSECONDS_PER_MILLISECOND = 1000000; | 22 static int NANOSECONDS_PER_MILLISECOND = 1000000; |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 return new Future.value(); | 303 return new Future.value(); |
306 } | 304 } |
307 // Give the server a short time to comply with the shutdown request; if it | 305 // Give the server a short time to comply with the shutdown request; if it |
308 // doesn't exit, then forcibly terminate it. | 306 // doesn't exit, then forcibly terminate it. |
309 sendServerShutdown(); | 307 sendServerShutdown(); |
310 return server.exitCode.timeout(SHUTDOWN_TIMEOUT, onTimeout: () { | 308 return server.exitCode.timeout(SHUTDOWN_TIMEOUT, onTimeout: () { |
311 return server.kill('server failed to exit'); | 309 return server.kill('server failed to exit'); |
312 }); | 310 }); |
313 } | 311 } |
314 } | 312 } |
OLD | NEW |