Added execution time measurement

master
Meliurwen 2 years ago
parent c77d7a23bb
commit c5abd6641c
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 4
      benchmark.py

@ -2,6 +2,7 @@
import glob
import os
import time
from pathlib import Path
from memory_profiler import profile
@ -23,6 +24,7 @@ def structure_constraint_based_estimation_example():
time_key='Time',
variables_key='Name'
)
start_time = time.time()
# <import the data at index 0 of the outer json array>
importer.import_data(0)
# construct a SamplePath Object passing a filled AbstractImporter object
@ -44,6 +46,8 @@ def structure_constraint_based_estimation_example():
)
# call the algorithm to estimate the structure
se1.estimate_structure()
end_time = time.time()
print("Elaspsed time: %d seconds" % (end_time - start_time))
# obtain the adjacency matrix of the estimated structure
print(se1.adjacency_matrix())
Path("./res").mkdir(parents=True, exist_ok=True)

Loading…
Cancel
Save