aboutsummaryrefslogtreecommitdiff
path: root/bench.py
diff options
context:
space:
mode:
Diffstat (limited to 'bench.py')
-rwxr-xr-xbench.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bench.py b/bench.py
index a20c566..d2cf8e3 100755
--- a/bench.py
+++ b/bench.py
@@ -202,6 +202,8 @@ def main():
if args.runs > 0:
print_status("Running", bench.name, "...")
+ start_time = datetime.datetime.now()
+ bench.results['facts']['start-time'] = start_time.isoformat()
try:
bench.run(runs=args.runs)
except Exception:
@@ -212,6 +214,9 @@ def main():
print_error("Skipping", bench, "!")
continue
+ end_time = datetime.datetime.now()
+ bench.results['facts']['end-time'] = end_time.isoformat()
+ bench.results['facts']['duration'] = end_time - start_time
# Save results in resultdir
bench.save(os.path.join(src.globalvars.resdir, f"{bench.name}.save"))