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

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

Issue 2844273003: Unify the server and plugin versions of the generators (Closed)
Patch Set: add missed files 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:convert'; 6 import 'dart:convert';
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:math'; 8 import 'dart:math';
9 9
10 import 'package:analysis_server/plugin/protocol/protocol.dart'; 10 import 'package:analysis_server/protocol/protocol_generated.dart';
11 import 'package:test/test.dart'; 11 import 'package:test/test.dart';
12 12
13 import '../../test/integration/integration_tests.dart'; 13 import '../../test/integration/support/integration_tests.dart';
14 14
15 void printMemoryResults(String id, String description, List<int> sizes) { 15 void printMemoryResults(String id, String description, List<int> sizes) {
16 int minMemory = sizes.fold(sizes.first, min); 16 int minMemory = sizes.fold(sizes.first, min);
17 int maxMemory = sizes.fold(sizes.first, max); 17 int maxMemory = sizes.fold(sizes.first, max);
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('memory: $sizes'); 20 print('memory: $sizes');
21 print('min_memory: $minMemory'); 21 print('min_memory: $minMemory');
22 print('max_memory: $maxMemory'); 22 print('max_memory: $maxMemory');
23 print(description.trim()); 23 print(description.trim());
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // Set roots and analyze. 121 // Set roots and analyze.
122 await test.sendAnalysisSetAnalysisRoots(roots, []); 122 await test.sendAnalysisSetAnalysisRoots(roots, []);
123 await test.analysisFinished; 123 await test.analysisFinished;
124 sizes.add(test.getMemoryUsage()); 124 sizes.add(test.getMemoryUsage());
125 // Stop the server. 125 // Stop the server.
126 await test.shutdown(); 126 await test.shutdown();
127 } 127 }
128 return sizes; 128 return sizes;
129 } 129 }
130 } 130 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/benchmark/perf/benchmark_scenario.dart ('k') | pkg/analysis_server/benchmark/perf/performance_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698