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

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

Issue 2879273002: Make server use the common protocol classes (Closed)
Patch Set: Created 3 years, 7 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/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
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 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/benchmark/perf/benchmark_flutter.dart ('k') | pkg/analysis_server/doc/api.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698