From c5abd6641c262bec7481aa40d77a89b4e46bc4f3 Mon Sep 17 00:00:00 2001 From: meliurwen Date: Thu, 9 Feb 2023 11:22:30 +0100 Subject: [PATCH] Added execution time measurement --- benchmark.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/benchmark.py b/benchmark.py index a4578b9..48e9fdf 100755 --- a/benchmark.py +++ b/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() # 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)