| 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);
|
| + }
|
| }
|
|
|