-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmark script improvements #186
Conversation
75dc36e
to
61b6267
Compare
61b6267
to
1219eea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 🚢 ⛵️
(when Travis passes)
), | ||
) | ||
parser.add_argument( | ||
'--harakiri', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I copied uwsgi's syntax for this: https://uwsgi-docs.readthedocs.io/en/latest/Glossary.html
scripts/benchmark.py
Outdated
'-n', | ||
'--num-iterations', | ||
default=1, | ||
# TODO: assert non-negative |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops. Forgot to remove this lol.
Yeah, we're not breaking new ground here. We've done this before: https://github.com/Yelp/detect-secrets/blob/master/detect_secrets/core/usage.py#L396
if not args.filenames: | ||
args.filenames = [ | ||
os.path.realpath( | ||
os.path.join( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nit: variable names could maybe help readability here
Summary
Building off #181, this adds the following features:
--pretty
preserves the human readable table)Example Output