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

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

Issue 2087763002: New scenario and local benchmark - refactoring after change. (Closed) Base URL: git@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
« no previous file with comments | « no previous file | pkg/analysis_server/benchmark/perf/benchmark_scenario.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9194c639fce4e704019ef0d3dc4a579d497e139f..7b17591d2a88d84b737ea645700829f31d4c60bf 100644
--- a/pkg/analysis_server/benchmark/perf/benchmark_local.dart
+++ b/pkg/analysis_server/benchmark/perf/benchmark_local.dart
@@ -4,6 +4,8 @@
library server.performance.local;
+import 'package:analysis_server/plugin/protocol/protocol.dart';
+
import 'benchmark_scenario.dart';
main(List<String> args) async {
@@ -168,4 +170,26 @@ main(List<String> args) async {
numOfRepeats: 5);
printBenchmarkResults(id, description, times);
}
+
+ {
+ String id = 'local-refactoring-1';
+ String description = r'''
+1. Open 'analyzer'.
+2. Change the name of a public method in src/context/cache.dart.
+3. Request rename refactoring for `getSourcesWithFullName` and measure time to get results.
+4. Rollback changes to the file and wait for analysis.
+5. Go to (2).
+''';
+ List<int> times = await new BenchmarkScenario()
+ .waitAnalyze_change_getRefactoring(
+ roots: [pathAnalyzer],
+ file: '$pathAnalyzer/lib/src/context/cache.dart',
+ fileChange: new FileChange(
+ afterStr: 'getState(An', afterStrBack: 3, insertStr: 'NewName'),
+ refactoringAtStr: 'getSourcesWithFullName(String path)',
+ refactoringKind: RefactoringKind.RENAME,
+ refactoringOptions: new RenameOptions('getSourcesWithFullName2'),
+ numOfRepeats: 5);
+ printBenchmarkResults(id, description, times);
+ }
}
« no previous file with comments | « no previous file | pkg/analysis_server/benchmark/perf/benchmark_scenario.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698