| 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/protocol/protocol_generated.dart'; | 11 import 'package:analysis_server/protocol/protocol_generated.dart'; |
| 12 import 'package:analyzer_plugin/protocol/protocol_common.dart'; |
| 12 import 'package:test/test.dart'; | 13 import 'package:test/test.dart'; |
| 13 | 14 |
| 14 import '../../test/integration/support/integration_tests.dart'; | 15 import '../../test/integration/support/integration_tests.dart'; |
| 15 import 'performance_tests.dart'; | 16 import 'performance_tests.dart'; |
| 16 | 17 |
| 17 void printBenchmarkResults(String id, String description, List<int> times) { | 18 void printBenchmarkResults(String id, String description, List<int> times) { |
| 18 int minTime = times.fold(1 << 20, min); | 19 int minTime = times.fold(1 << 20, min); |
| 19 String now = new DateTime.now().toUtc().toIso8601String(); | 20 String now = new DateTime.now().toUtc().toIso8601String(); |
| 20 print('$now ========== $id'); | 21 print('$now ========== $id'); |
| 21 print('times: $times'); | 22 print('times: $times'); |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 this.insertStr, | 303 this.insertStr, |
| 303 this.replaceWhat, | 304 this.replaceWhat, |
| 304 this.replaceWith}) { | 305 this.replaceWith}) { |
| 305 if (afterStr != null) { | 306 if (afterStr != null) { |
| 306 outOfTestExpect(insertStr, isNotNull, reason: 'insertStr'); | 307 outOfTestExpect(insertStr, isNotNull, reason: 'insertStr'); |
| 307 } else if (replaceWhat != null) { | 308 } else if (replaceWhat != null) { |
| 308 outOfTestExpect(replaceWith, isNotNull, reason: 'replaceWith'); | 309 outOfTestExpect(replaceWith, isNotNull, reason: 'replaceWith'); |
| 309 } | 310 } |
| 310 } | 311 } |
| 311 } | 312 } |
| OLD | NEW |