diff --git a/scripts/time_large_tokamak.py b/scripts/time_large_tokamak.py deleted file mode 100644 index ff8a5ed76..000000000 --- a/scripts/time_large_tokamak.py +++ /dev/null @@ -1,23 +0,0 @@ -"""Running this script will run large tokamak and print its runtime [s] to stdout.""" - -import subprocess -import time -from pathlib import Path - - -def large_tokamak_runtime(): - """Runs large tokamak and returns the runtime in seconds""" - script_dir = Path(__file__).resolve().parent - large_tokamak_path = ( - script_dir / "../tests/regression/scenarios/large-tokamak/IN.DAT" - ) - - start = time.time() - - subprocess.run(f"process -i {str(large_tokamak_path.resolve())}", shell=True) - - return time.time() - start - - -if __name__ == "__main__": - print(f"Runtime of large tokamak: {large_tokamak_runtime()}") diff --git a/scripts/time_numpy_baseline.py b/scripts/time_numpy_baseline.py deleted file mode 100644 index d4ba05456..000000000 --- a/scripts/time_numpy_baseline.py +++ /dev/null @@ -1,38 +0,0 @@ -"""Running this script will print the average runtime of a computationally intensive baseline. -This can then be used to normalise other runtime calculations to mitigate bias introduced -by hardware, system load, etc. The average runtime [s] will be printed to stdout.""" - -import time - -import numpy as np - - -def numpy_baseline_runtime(): - """Runs a computational intense numeric baseline 10 times and - returns the average runtime in seconds.""" - - np.random.seed(42) - - N = 3500 - - A = np.random.rand(N, N) - B = np.random.rand(N, N) - - starts = [] - ends = [] - - for _ in range(10): - starts.append(time.time()) - - A @ B - - ends.append(time.time()) - - starts = np.array(starts) - ends = np.array(ends) - - return (ends - starts).mean() - - -if __name__ == "__main__": - print(f"Average runtime of the numpy baseline: {numpy_baseline_runtime()}")