8000 Expose --min-time from pyperf to pyperformance CLI (#301) · python/pyperformance@662454d · GitHub
[go: up one dir, main page]

Skip to content

Commit 662454d

Browse files
authored
Expose --min-time from pyperf to pyperformance CLI (#301)
1 parent ef1d636 commit 662454d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

pyperformance/cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ def parse_args():
7272
cmd.add_argument("--append", metavar="FILENAME",
7373
help="Add runs to an existing file, or create it "
7474
"if it doesn't exist")
75+
cmd.add_argument("--min-time", metavar="MIN_TIME",
76+
help="Minimum duration in seconds of a single "
77+
"value, used to calibrate the number of loops")
7578
filter_opts(cmd)
7679

7780
# show

pyperformance/run.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,5 +206,7 @@ def get_pyperf_opts(options):
206206
opts.append('--track-memory')
207207
if options.inherit_environ:
208208
opts.append('--inherit-environ=%s' % ','.join(options.inherit_environ))
209+
if options.min_time:
210+
opts.append('--min-time=%s' % options.min_time)
209211

210212
return opts

0 commit comments

Comments
 (0)
0