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

Unified Diff: pkg/analysis_server/benchmark/integration/local_runner.dart

Issue 1250343002: performance measurement improvements and README update (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: doc tweak Created 5 years, 5 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/integration/local_runner.dart
diff --git a/pkg/analysis_server/benchmark/integration/local_runner.dart b/pkg/analysis_server/benchmark/integration/local_runner.dart
index 1728272b5ded40bd09101c21caf7e9ef5c3fbd66..78d8c2a78f0048b2a86a98b55b0f3a4e05db17bf 100644
--- a/pkg/analysis_server/benchmark/integration/local_runner.dart
+++ b/pkg/analysis_server/benchmark/integration/local_runner.dart
@@ -12,7 +12,7 @@ main(List<String> args) {
/*
* Parse arguments
*/
- if (args.length != 3) printHelp('Expected 3 arguments');
+ if (args.length < 3) printHelp('Expected 3 arguments');
var gitDir = new Directory(args[0]);
if (!gitDir.existsSync()) printHelp('${gitDir.path} does not exist');
if (!new Directory(join(gitDir.path, '.git')).existsSync()) printHelp(
@@ -58,16 +58,17 @@ main(List<String> args) {
]);
if (result.exitCode != 0) throw 'failed to link out or xcodebuild: $result';
/*
+ * Collect arguments
+ */
+ var perfArgs = ['-i${inputFile.path}', '-t$tmpSrcDirPath',];
+ for (int index = 3; index < args.length; ++index) {
+ perfArgs.add(args[index].replaceAll('@tmpSrcDir@', tmpSrcDirPath));
+ }
+ perfArgs.add('-m${gitDir.path},$tmpSrcDirPath');
+ /*
* Launch the performance analysis tool
*/
- performance.main([
- //'-vv', // very verbose
- //'-d8081', // analysis server localhost diagnostic port
- //'--newTaskModel',
- '-i${inputFile.path}',
- '-t$tmpSrcDirPath',
- '-m${gitDir.path},$tmpSrcDirPath',
- ]);
+ performance.main(perfArgs);
}
/// Print help and exit
@@ -77,9 +78,12 @@ void printHelp([String errMsg]) {
print('Error: $errMsg');
print('');
}
- print('Arguments: <gitDir> <branch> <inputFile>');
- print('gitDir = git repository containing the initial target source');
- print('branch = the branch containing the initial target source');
- print('inputFile = the instrumentation or log file');
+ print('''Required arguments: <gitDir> <branch> <inputFile>
+gitDir = a path to the git repository containing the initial target source
+branch = the branch containing the initial target source
+inputFile = the instrumentation or log file
+
+Optional arguments:''');
+ print(performance.argParser.usage);
exit(1);
}

Powered by Google App Engine
This is Rietveld 408576698