9
9
* Create a temp clone of the mypy repo for each target commit to measure
10
10
* Checkout a target commit in each of the clones
11
11
* Compile mypyc in each of the clones *in parallel*
12
- * Create another temp clone of the mypy repo as the code to check
12
+ * Create another temp clone of the first provided revision (or, with -r, a foreign repo) as the code to check
13
13
* Self check with each of the compiled mypys N times
14
14
* Report the average runtimes and relative performance
15
15
* Remove the temp clones
@@ -100,6 +100,8 @@ def run_benchmark(
100
100
def main () -> None :
101
101
whole_program_time_0 = time .time ()
102
102
parser = argparse .ArgumentParser (
103
+ formatter_class = argparse .RawDescriptionHelpFormatter ,
104
+ description = __doc__ ,
103
105
epilog = "Remember: you usually want the first argument to this command to be 'master'."
104
106
)
105
107
parser .add_argument (
@@ -112,7 +114,8 @@ def main() -> None:
112
114
"--dont-setup" ,
113
115
default = False ,
114
116
action = "store_true" ,
115
- help = "don't make the dirs or compile mypy, just run the performance measurement benchmark" ,
117
+ help = "don't make the clones or compile mypy, just run the performance measurement benchmark "
118
+ + "(this will fail unless the clones already exist, such as from a previous run that was canceled before it deleted them)" ,
116
119
)
117
120
parser .add_argument (
118
121
"--num-runs" ,
@@ -133,8 +136,9 @@ def main() -> None:
133
136
metavar = "FOREIGN_REPOSITORY" ,
134
137
default = None ,
135
138
type = str ,
136
- help = "measure time to type check the project at FOREIGN_REPOSITORY instead of mypy self-check; "
137
- + "provided value must be the URL or path of a git repo" ,
139
+ help = "measure time to typecheck the project at FOREIGN_REPOSITORY instead of mypy self-check; "
140
+ + "the provided value must be the URL or path of a git repo "
141
+ + "(note that this script will take no special steps to *install* the foreign repo, so you will probably get a lot of missing import errors)" ,
138
142
)
139
143
parser .add_argument (
140
144
"-c" ,
@@ -143,7 +147,7 @@ def main() -> None:
143
147
type = str ,
144
148
help = "measure time to type check Python code fragment instead of mypy self-check" ,
145
149
)
146
- parser .add_argument ("commit" , nargs = "+" , help = "git revision to measure ( e.g. branch name) " )
150
+ parser .add_argument ("commit" , nargs = "+" , help = "git revision(s), e.g. branch name or commit id, to measure the performance of " )
147
151
args = parser .parse_args ()
148
152
incremental : bool = args .incremental
149
153
dont_setup : bool = args .dont_setup
0 commit comments