| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:io'; | 5 import 'dart:io'; |
| 6 import 'package:path/path.dart'; | 6 import 'package:path/path.dart'; |
| 7 import 'main.dart' as performance; | 7 import 'main.dart' as performance; |
| 8 | 8 |
| 9 // Local driver for performance measurement | 9 // Local driver for performance measurement |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 '-s', | 55 '-s', |
| 56 join(gitDir.path, outDirName), | 56 join(gitDir.path, outDirName), |
| 57 join(tmpSrcDirPath, outDirName) | 57 join(tmpSrcDirPath, outDirName) |
| 58 ]); | 58 ]); |
| 59 if (result.exitCode != 0) throw 'failed to link out or xcodebuild: $result'; | 59 if (result.exitCode != 0) throw 'failed to link out or xcodebuild: $result'; |
| 60 /* | 60 /* |
| 61 * Launch the performance analysis tool | 61 * Launch the performance analysis tool |
| 62 */ | 62 */ |
| 63 performance.main([ | 63 performance.main([ |
| 64 //'-vv', // very verbose | 64 //'-vv', // very verbose |
| 65 '-i', | 65 //'-d8081', // analysis server localhost diagnostic port |
| 66 inputFile.path, | 66 '-i${inputFile.path}', |
| 67 '-t', | 67 '-t$tmpSrcDirPath', |
| 68 tmpSrcDirPath, | 68 '-m${gitDir.path},$tmpSrcDirPath', |
| 69 '-m', | |
| 70 '${gitDir.path},$tmpSrcDirPath', | |
| 71 ]); | 69 ]); |
| 72 } | 70 } |
| 73 | 71 |
| 74 /// Print help and exit | 72 /// Print help and exit |
| 75 void printHelp([String errMsg]) { | 73 void printHelp([String errMsg]) { |
| 76 if (errMsg != null) { | 74 if (errMsg != null) { |
| 77 print(''); | 75 print(''); |
| 78 print('Error: $errMsg'); | 76 print('Error: $errMsg'); |
| 79 print(''); | 77 print(''); |
| 80 } | 78 } |
| 81 print('Arguments: <gitDir> <branch> <inputFile>'); | 79 print('Arguments: <gitDir> <branch> <inputFile>'); |
| 82 print('gitDir = git repository containing the initial target source'); | 80 print('gitDir = git repository containing the initial target source'); |
| 83 print('branch = the branch containing the initial target source'); | 81 print('branch = the branch containing the initial target source'); |
| 84 print('inputFile = the instrumentation or log file'); | 82 print('inputFile = the instrumentation or log file'); |
| 85 exit(1); | 83 exit(1); |
| 86 } | 84 } |
| OLD | NEW |