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

Unified Diff: pkg/analysis_server/benchmark/perf/benchmark_local.dart

Issue 2111743002: Add two memory usage benchmarks (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/benchmark/perf/benchmark_local.dart
diff --git a/pkg/analysis_server/benchmark/perf/benchmark_local.dart b/pkg/analysis_server/benchmark/perf/benchmark_local.dart
index a6fd493461fb5011732244522f240ac6643719ad..8cbdb8979fb0c238e5fe2b0a59fda373aeb924cb 100644
--- a/pkg/analysis_server/benchmark/perf/benchmark_local.dart
+++ b/pkg/analysis_server/benchmark/perf/benchmark_local.dart
@@ -9,6 +9,7 @@ import 'dart:async';
import 'package:analysis_server/plugin/protocol/protocol.dart';
import 'benchmark_scenario.dart';
+import 'memory_tests.dart';
main(List<String> args) async {
int length = args.length;
@@ -35,6 +36,9 @@ main(List<String> args) async {
await run_local_completion_3();
await run_local_completion_4();
await run_local_refactoring_1();
+
+ await run_memory_initialAnalysis_1();
+ await run_memory_initialAnalysis_2();
}
PathHolder paths;
@@ -224,6 +228,35 @@ Future run_local_refactoring_1() async {
printBenchmarkResults(id, description, times);
}
+Future run_memory_initialAnalysis_1() async {
+ String id = 'memory-initialAnalysis-1';
+ String description = r'''
+1. Start server, set 'analyzer' and 'analysis_server' analysis roots.
scheglov 2016/07/06 17:55:04 I as can see, we set only "analyzer" as the analys
+2. Measure the memory usage after finishing initial analysis.
+3. Shutdown the server.
+4. Go to (1).
+''';
+ List<int> sizes = await AnalysisServerMemoryUsageTest
+ .start_waitInitialAnalysis_shutdown(
+ roots: <String>[paths.analyzer], numOfRepeats: 3);
+ printMemoryResults(id, description, sizes);
+}
+
+Future run_memory_initialAnalysis_2() async {
+ String id = 'memory-initialAnalysis-2';
+ String description = r'''
+1. Start server, set 'analyzer' and 'analysis_server' analysis roots.
+2. Measure the memory usage after finishing initial analysis.
+3. Shutdown the server.
+4. Go to (1).
+''';
+ List<int> sizes = await AnalysisServerMemoryUsageTest
+ .start_waitInitialAnalysis_shutdown(
+ roots: <String>[paths.analyzer, paths.analysisServer],
+ numOfRepeats: 3);
+ printMemoryResults(id, description, sizes);
+}
+
class PathHolder {
String analysisServer;
String analyzer;

Powered by Google App Engine
This is Rietveld 408576698