()
| 26 | JSON_FILE_EXTENSION=".pb_converted.json" |
| 27 | |
| 28 | def parse_args(): |
| 29 | parser = argparse.ArgumentParser( |
| 30 | description="Run story and collect runtime call stats.") |
| 31 | parser.add_argument("story", metavar="story", nargs=1, help="story to run") |
| 32 | parser.add_argument( |
| 33 | "--group", |
| 34 | dest="group", |
| 35 | action="store_true", |
| 36 | help="group common stats together into buckets") |
| 37 | parser.add_argument( |
| 38 | "-r", |
| 39 | "--repeats", |
| 40 | dest="repeats", |
| 41 | metavar="N", |
| 42 | action="store", |
| 43 | type=int, |
| 44 | default=1, |
| 45 | help="number of times to run the story") |
| 46 | parser.add_argument( |
| 47 | "-v", |
| 48 | "--verbose", |
| 49 | dest="verbose", |
| 50 | action="store_true", |
| 51 | help="output benchmark runs to stdout") |
| 52 | parser.add_argument( |
| 53 | "--device", |
| 54 | dest="device", |
| 55 | action="store", |
| 56 | help="device to run the test on. Passed directly to run_benchmark") |
| 57 | parser.add_argument( |
| 58 | "-d", |
| 59 | "--dir", |
| 60 | dest="dir", |
| 61 | action="store", |
| 62 | help=("directory to look for already generated output in. This must " |
| 63 | "already exists and it won't re-run the benchmark")) |
| 64 | parser.add_argument( |
| 65 | "-f", |
| 66 | "--format", |
| 67 | dest="format", |
| 68 | action="store", |
| 69 | choices=["csv", "table"], |
| 70 | help="output as CSV") |
| 71 | parser.add_argument( |
| 72 | "-o", |
| 73 | "--output", |
| 74 | metavar="FILE", |
| 75 | dest="out_file", |
| 76 | action="store", |
| 77 | help="write table to FILE rather stdout") |
| 78 | parser.add_argument( |
| 79 | "--browser", |
| 80 | dest="browser", |
| 81 | metavar="BROWSER_TYPE", |
| 82 | action="store", |
| 83 | default="release", |
| 84 | help=("Passed directly to --browser option of run_benchmark. Ignored if " |
| 85 | "-executable is used")) |
no test coverage detected