init
This commit is contained in:
55
lab3/results/run.py
Normal file
55
lab3/results/run.py
Normal file
@@ -0,0 +1,55 @@
|
||||
from subprocess import check_output
|
||||
import subprocess
|
||||
import random
|
||||
import matplotlib.pyplot as plt
|
||||
import time
|
||||
|
||||
random.seed()
|
||||
|
||||
loc = "../build/Lab3"
|
||||
|
||||
f = open('out','w')
|
||||
f.write("Timer values")
|
||||
|
||||
for function in range(3, 5):
|
||||
print("Method: " + str(function))
|
||||
for q in range(0, 15):
|
||||
print("Function: " + str(q))
|
||||
f.write(str(q) + "\n")
|
||||
start = time.time()
|
||||
|
||||
subprocess.call([
|
||||
loc,
|
||||
str(q),
|
||||
str(20),
|
||||
str(random.randint(0, 2147483646)),
|
||||
str(function)
|
||||
])
|
||||
|
||||
end = time.time()
|
||||
f.write(str(end-start) + "\n")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
f.close()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user