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

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

Issue 2986293002: Redo our benchmarks; add a benchmark/benchmarks.dart tool. (Closed)
Patch Set: copyright year Created 3 years, 4 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 | « pkg/analysis_server/benchmark/perf/benchmarks_impl.dart ('k') | pkg/analysis_server/benchmark/readme.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/benchmark/perf/completion_timing_tests.dart
diff --git a/pkg/analysis_server/benchmark/perf/completion_timing_tests.dart b/pkg/analysis_server/benchmark/perf/completion_timing_tests.dart
index 6acd038f3581f7d82b56bac2d69e80f811ebddbf..0a1204195b9adc52dfbf1f01ee6cd5aaf175716e 100644
--- a/pkg/analysis_server/benchmark/perf/completion_timing_tests.dart
+++ b/pkg/analysis_server/benchmark/perf/completion_timing_tests.dart
@@ -10,32 +10,31 @@ import 'package:test/test.dart';
import 'performance_tests.dart';
+const COMPLETION_OFFSET = 'offset';
+const PRIORITY_FILE_OPTION = 'priority';
+const SOURCE_OPTION = 'source';
+
/**
* Pass in the directory of the source to be analyzed as option `--source`,
* specify a priority file with `--priority` and an offset for completions
* with a `--offset`.
*/
-main(List<String> arguments) {
+main(List<String> arguments) async {
ArgParser parser = _createArgParser();
var args = parser.parse(arguments);
if (args[SOURCE_OPTION] == null) {
print('path to source directory must be specified');
exit(1);
}
- source = args[SOURCE_OPTION];
- priorityFile = args[PRIORITY_FILE_OPTION];
- offset = int.parse(args[COMPLETION_OFFSET]);
-
- Future.wait([new CompletionTimingTest().test_timing()]);
-}
-const COMPLETION_OFFSET = 'offset';
-const PRIORITY_FILE_OPTION = 'priority';
-const SOURCE_OPTION = 'source';
+ int offset = int.parse(args[COMPLETION_OFFSET]);
+ String priorityFile = args[PRIORITY_FILE_OPTION];
+ String source = args[SOURCE_OPTION];
-int offset;
-String priorityFile;
-String source;
+ CompletionTimingTest test =
+ new CompletionTimingTest(offset, priorityFile, source);
+ await test.test_timing();
+}
ArgParser _createArgParser() => new ArgParser()
..addOption(SOURCE_OPTION, help: 'full path to source directory for analysis')
@@ -50,8 +49,14 @@ ArgParser _createArgParser() => new ArgParser()
* completions.
*/
class CompletionTimingTest extends AbstractTimingTest {
+ final int offset;
+ final String priorityFile;
+ final String source;
+
List<Duration> timings = <Duration>[];
+ CompletionTimingTest(this.offset, this.priorityFile, this.source);
+
Future test_timing() async {
// debugStdio();
« no previous file with comments | « pkg/analysis_server/benchmark/perf/benchmarks_impl.dart ('k') | pkg/analysis_server/benchmark/readme.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698