summaryrefslogtreecommitdiff
path: root/tools/certtools.py
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2017-03-17 00:58:54 +0100
committerLinus Nordberg <linus@nordu.net>2017-07-06 17:41:27 +0200
commit49445bfe1985054ee18691bf27c4033285401ddb (patch)
tree599c0996343e9641024b65a81f7026a1e5dcaf74 /tools/certtools.py
parent107b977cb8fa0df0ca5619c2f9fd9e3e6e5a83a1 (diff)
Added benchmark reporting.
Change timing_point to time.time interface.
Diffstat (limited to 'tools/certtools.py')
-rw-r--r--tools/certtools.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/certtools.py b/tools/certtools.py
index cb56a8d..84d0bd9 100644
--- a/tools/certtools.py
+++ b/tools/certtools.py
@@ -18,6 +18,7 @@ import shutil
import requests
import warnings
import logging
+import time
from time import sleep
from certkeys import publickeys
@@ -446,13 +447,12 @@ def get_leaf_hash(merkle_tree_leaf):
return leaf_hash.digest()
def timing_point(timer_dict=None, name=None):
- t = datetime.datetime.now()
+ t = time.time()
if timer_dict:
starttime = timer_dict["lasttime"]
stoptime = t
deltatime = stoptime - starttime
- microseconds = deltatime.seconds * 1000000 + deltatime.microseconds
- timer_dict["deltatimes"].append((name, microseconds))
+ timer_dict["deltatimes"].append((name, deltatime))
timer_dict["lasttime"] = t
#print name, microseconds/1000000.0
return None