| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.scenarios; | 5 library server.performance.scenarios; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 import 'dart:math'; | 9 import 'dart:math'; |
| 10 | 10 |
| 11 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 11 import 'package:analysis_server/protocol/protocol_generated.dart'; |
| 12 import 'package:test/test.dart'; | 12 import 'package:test/test.dart'; |
| 13 | 13 |
| 14 import '../../test/integration/integration_tests.dart'; | 14 import '../../test/integration/support/integration_tests.dart'; |
| 15 import 'performance_tests.dart'; | 15 import 'performance_tests.dart'; |
| 16 | 16 |
| 17 void printBenchmarkResults(String id, String description, List<int> times) { | 17 void printBenchmarkResults(String id, String description, List<int> times) { |
| 18 int minTime = times.fold(1 << 20, min); | 18 int minTime = times.fold(1 << 20, min); |
| 19 String now = new DateTime.now().toUtc().toIso8601String(); | 19 String now = new DateTime.now().toUtc().toIso8601String(); |
| 20 print('$now ========== $id'); | 20 print('$now ========== $id'); |
| 21 print('times: $times'); | 21 print('times: $times'); |
| 22 print('min_time: $minTime'); | 22 print('min_time: $minTime'); |
| 23 print(description.trim()); | 23 print(description.trim()); |
| 24 print('--------------------'); | 24 print('--------------------'); |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 this.insertStr, | 302 this.insertStr, |
| 303 this.replaceWhat, | 303 this.replaceWhat, |
| 304 this.replaceWith}) { | 304 this.replaceWith}) { |
| 305 if (afterStr != null) { | 305 if (afterStr != null) { |
| 306 outOfTestExpect(insertStr, isNotNull, reason: 'insertStr'); | 306 outOfTestExpect(insertStr, isNotNull, reason: 'insertStr'); |
| 307 } else if (replaceWhat != null) { | 307 } else if (replaceWhat != null) { |
| 308 outOfTestExpect(replaceWith, isNotNull, reason: 'replaceWith'); | 308 outOfTestExpect(replaceWith, isNotNull, reason: 'replaceWith'); |
| 309 } | 309 } |
| 310 } | 310 } |
| 311 } | 311 } |
| OLD | NEW |