From e9e4c0882d1de8c23b7d199758a32f0ae036b0ac Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 12 Oct 2022 10:17:44 +0200 Subject: [PATCH] gh-97669: Remove Tools/scripts/startuptime.py The "pyperf command" tool be used instead. Example: $ python3 -m pyperf command -- python3 -c pass ..................... command: Mean +- std dev: 17.8 ms +- 0.4 ms pyperf also computes the standard deviation which gives an idea of the benchmark looks reliable or not. --- Tools/scripts/startuptime.py | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 Tools/scripts/startuptime.py diff --git a/Tools/scripts/startuptime.py b/Tools/scripts/startuptime.py deleted file mode 100644 index 1bb5b208f66e04..00000000000000 --- a/Tools/scripts/startuptime.py +++ /dev/null @@ -1,22 +0,0 @@ -# Quick script to time startup for various binaries - -import subprocess -import sys -import time - -NREPS = 100 - - -def main(): - binaries = sys.argv[1:] - for bin in binaries: - t0 = time.time() - for _ in range(NREPS): - result = subprocess.run([bin, "-c", "pass"]) - result.check_returncode() - t1 = time.time() - print(f"{(t1-t0)/NREPS:6.3f} {bin}") - - -if __name__ == "__main__": - main()