mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
29 lines
609 B
Python
29 lines
609 B
Python
import os, sys, time
|
|
try:
|
|
import numpy as np
|
|
from scipy import mean, stats
|
|
except ModuleNotFoundError:
|
|
print("Warning: scipy package is not installed, confidence values will not be available")
|
|
stats = None
|
|
|
|
duration_list = []
|
|
|
|
for i in range(1,10):
|
|
start = time.perf_counter()
|
|
|
|
print(sys.argv[1])
|
|
|
|
os.system(sys.argv[1])
|
|
|
|
end = time.perf_counter()
|
|
|
|
duration_ms = (end - start) * 1000
|
|
|
|
duration_list.append(duration_ms)
|
|
|
|
|
|
# Stats
|
|
mean = np.mean(duration_list)
|
|
std_err = stats.sem(duration_list)
|
|
|
|
print("SUCCESS: {} : {:.2f}ms +/- {:.2f}% on luau ".format('duration', mean,std_err))
|