diff --git a/benchmark.py b/benchmark.py index de691c1..1f1df93 100644 --- a/benchmark.py +++ b/benchmark.py @@ -22,6 +22,7 @@ def generate_file(parent_dir, size_b): try: dir = sys.argv[1] except: + print("pass destination directory as an argument if you want") dir = None with tempfile.TemporaryDirectory(dir=dir) as tmp_dir: @@ -36,7 +37,7 @@ def generate_file(parent_dir, size_b): for use_fast_copy in (False, True): print(">>> with%s speedcopy ..." % ("" if use_fast_copy else "out")) v = timeit.repeat( - setup=("import shutil; import speedcopy; " + setup=("import shutil; import speedcopy; speedcopy.patch_copyfile(); " "p1 = {}; p2 = {}").format(repr(src), repr(dst)), stmt="shutil.{}(p1, p2)".format( "copyfile" if use_fast_copy else "_orig_copyfile"),