63 parser = ArgumentParser(description=HELP)
64
65 parser.add_argument('outdir', type=str, help="output directory")
66 parser.add_argument('a', type=str, help="name of A")
67 parser.add_argument('b', type=str, help="name of B")
68 parser.add_argument('nano_a', type=str, help="path to A's nanobench binary")
69 parser.add_argument('nano_b', type=str, help="path to B's nanobench binary")
70 parser.add_argument('arg_a', type=str, help="args for A's nanobench run")
71 parser.add_argument('arg_b', type=str, help="args for B's nanobench run")
72 parser.add_argument('repeat', type=int, help="number of initial runs")
73 parser.add_argument('skip_b', type=str, help=("whether to skip running B"
74 " ('true' or 'false')"))
75 parser.add_argument('config', type=str, help="nanobenh config")
76 parser.add_argument('threads', type=int, help="number of threads to run")
77 parser.add_argument('noinit', type=str, help=("whether to skip running B"
78 " ('true' or 'false')"))
79
80 parser.add_argument('--concise', dest='concise', action="store_true",
81 help="If set, no verbose thread info will be printed.")
82 parser.set_defaults(concise=False)
83
84
85 BHELP = "bot specific options"
86 parser.add_argument('--githash', type=str, default="", help=BHELP)
87 parser.add_argument('--keys', type=str, default=[], nargs='+', help=BHELP)
88
89 args = parser.parse_args()
90 args.skip_b = args.skip_b == "true"
91 args.noinit = args.noinit == "true"
92
93 if args.threads == -1:
94 args.threads = 1
95 if args.config in ["8888", "565"]:
96 args.threads =
max(1, multiprocessing.cpu_count() / 2)
97
98 return args
99
static void parse_args(int argc, char *argv[], Args *args)