| 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.local; | 5 library server.performance.local; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 9 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| 10 | 10 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 refactoringAtStr: 'getSourcesWithFullName(String path)', | 224 refactoringAtStr: 'getSourcesWithFullName(String path)', |
| 225 refactoringKind: RefactoringKind.RENAME, | 225 refactoringKind: RefactoringKind.RENAME, |
| 226 refactoringOptions: new RenameOptions('getSourcesWithFullName2'), | 226 refactoringOptions: new RenameOptions('getSourcesWithFullName2'), |
| 227 numOfRepeats: 5); | 227 numOfRepeats: 5); |
| 228 printBenchmarkResults(id, description, times); | 228 printBenchmarkResults(id, description, times); |
| 229 } | 229 } |
| 230 | 230 |
| 231 Future run_memory_initialAnalysis_1() async { | 231 Future run_memory_initialAnalysis_1() async { |
| 232 String id = 'memory-initialAnalysis-1'; | 232 String id = 'memory-initialAnalysis-1'; |
| 233 String description = r''' | 233 String description = r''' |
| 234 1. Start server, set 'analyzer' and 'analysis_server' analysis roots. | 234 1. Start server, set 'analyzer' as the analysis root. |
| 235 2. Measure the memory usage after finishing initial analysis. | 235 2. Measure the memory usage after finishing initial analysis. |
| 236 3. Shutdown the server. | 236 3. Shutdown the server. |
| 237 4. Go to (1). | 237 4. Go to (1). |
| 238 '''; | 238 '''; |
| 239 List<int> sizes = await AnalysisServerMemoryUsageTest | 239 List<int> sizes = await AnalysisServerMemoryUsageTest |
| 240 .start_waitInitialAnalysis_shutdown( | 240 .start_waitInitialAnalysis_shutdown( |
| 241 roots: <String>[paths.analyzer], numOfRepeats: 3); | 241 roots: <String>[paths.analyzer], numOfRepeats: 3); |
| 242 printMemoryResults(id, description, sizes); | 242 printMemoryResults(id, description, sizes); |
| 243 } | 243 } |
| 244 | 244 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 263 String flutterHelloWorld; | 263 String flutterHelloWorld; |
| 264 String flutterStocks; | 264 String flutterStocks; |
| 265 | 265 |
| 266 PathHolder({String sdkPath, String flutterPath}) { | 266 PathHolder({String sdkPath, String flutterPath}) { |
| 267 analysisServer = '$sdkPath/pkg/analysis_server'; | 267 analysisServer = '$sdkPath/pkg/analysis_server'; |
| 268 analyzer = '$sdkPath/pkg/analyzer'; | 268 analyzer = '$sdkPath/pkg/analyzer'; |
| 269 flutterHelloWorld = '$flutterPath/examples/hello_world'; | 269 flutterHelloWorld = '$flutterPath/examples/hello_world'; |
| 270 flutterStocks = '$flutterPath/examples/stocks'; | 270 flutterStocks = '$flutterPath/examples/stocks'; |
| 271 } | 271 } |
| 272 } | 272 } |
| OLD | NEW |