mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
make run-benchmarks.py work (with no args)
This commit is contained in:
parent
e44d6a88fb
commit
6ab73764ea
@ -215,9 +215,9 @@ if __name__ == '__main__':
|
||||
args.cacert = os.path.join(tmpdir, 'benchmark-warcprox-ca.pem')
|
||||
args.certs_dir = os.path.join(tmpdir, 'benchmark-warcprox-ca')
|
||||
args.directory = os.path.join(tmpdir, 'warcs')
|
||||
if args.rethinkdb_servers:
|
||||
args.rethinkdb_db = 'benchmarks_{:%Y%m%d%H%M%S}' % (
|
||||
datetime.datetime.utcnow())
|
||||
# if args.rethinkdb_servers:
|
||||
# args.rethinkdb_db = 'benchmarks_{:%Y%m%d%H%M%S}' % (
|
||||
# datetime.datetime.utcnow())
|
||||
|
||||
start_servers()
|
||||
logging.info(
|
||||
@ -247,7 +247,9 @@ if __name__ == '__main__':
|
||||
logging.info('SKIPPED')
|
||||
logging.info('===== baseline benchmark finished =====')
|
||||
|
||||
warcprox_controller = warcprox.main.init_controller(args)
|
||||
options = warcprox.Options(**vars(args))
|
||||
warcprox_controller = warcprox.controller.WarcproxController(options)
|
||||
|
||||
warcprox_controller_thread = threading.Thread(
|
||||
target=warcprox_controller.run_until_shutdown)
|
||||
warcprox_controller_thread.start()
|
||||
|
@ -61,7 +61,7 @@ class BetterArgumentDefaultsHelpFormatter(
|
||||
else:
|
||||
return argparse.ArgumentDefaultsHelpFormatter._get_help_string(self, action)
|
||||
|
||||
def _build_arg_parser(prog):
|
||||
def _build_arg_parser(prog='warcprox'):
|
||||
arg_parser = argparse.ArgumentParser(prog=prog,
|
||||
description='warcprox - WARC writing MITM HTTP/S proxy',
|
||||
formatter_class=BetterArgumentDefaultsHelpFormatter)
|
||||
|
Loading…
x
Reference in New Issue
Block a user