bench: set log level to WARN, make --verbose raise it to INFO (#898)

I personally found the output by default somewhat noisy, especially for
large requirements files. Since --verbose is already a thing, I propose
making the extra output opt-in.
This commit is contained in:
Andrew Gallant 2024-01-12 10:07:58 -05:00 committed by GitHub
parent 0cc98c771e
commit 1629141d67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 6 deletions

View File

@ -517,12 +517,6 @@ class Puffin(Suite):
def main():
"""Run the benchmark."""
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s %(levelname)s %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
)
parser = argparse.ArgumentParser(
description="Benchmark Puffin against other packaging tools."
)
@ -603,6 +597,11 @@ def main():
)
args = parser.parse_args()
logging.basicConfig(
level=logging.INFO if args.verbose else logging.WARN,
format="%(asctime)s %(levelname)s %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
)
verbose = args.verbose
warmup = args.warmup