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

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

Issue 2394683006: Switch analysis_server to use 'package:test'. (Closed)
Patch Set: Created 4 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
OLDNEW
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/plugin/protocol/protocol.dart';
12 import 'package:unittest/unittest.dart'; 12 import 'package:test/test.dart';
13 13
14 import 'performance_tests.dart'; 14 import 'performance_tests.dart';
15 15
16 void printBenchmarkResults(String id, String description, List<int> times) { 16 void printBenchmarkResults(String id, String description, List<int> times) {
17 int minTime = times.fold(1 << 20, min); 17 int minTime = times.fold(1 << 20, min);
18 String now = new DateTime.now().toUtc().toIso8601String(); 18 String now = new DateTime.now().toUtc().toIso8601String();
19 print('$now ========== $id'); 19 print('$now ========== $id');
20 print('times: $times'); 20 print('times: $times');
21 print('min_time: $minTime'); 21 print('min_time: $minTime');
22 print(description.trim()); 22 print(description.trim());
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 final String replaceWith; 294 final String replaceWith;
295 295
296 FileChange({this.afterStr, this.afterStrBack: 0, this.insertStr, this.replaceW hat, this.replaceWith}) { 296 FileChange({this.afterStr, this.afterStrBack: 0, this.insertStr, this.replaceW hat, this.replaceWith}) {
297 if (afterStr != null) { 297 if (afterStr != null) {
298 expect(insertStr, isNotNull, reason: 'insertStr'); 298 expect(insertStr, isNotNull, reason: 'insertStr');
299 } else if (replaceWhat != null) { 299 } else if (replaceWhat != null) {
300 expect(replaceWith, isNotNull, reason: 'replaceWith'); 300 expect(replaceWith, isNotNull, reason: 'replaceWith');
301 } 301 }
302 } 302 }
303 } 303 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698