diff options
author | Magnus Ahltorp <map@kth.se> | 2017-03-17 00:58:54 +0100 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2017-03-17 02:04:21 +0100 |
commit | f8682a341610a69cecf46b18a34cc0d217d21499 (patch) | |
tree | 9ef19c677d097a8ccf067727317232c3abb1d8f6 /tools/certtools.py | |
parent | 4ec7a9d1e9cf31d9cc00c81578ffb52d15f91181 (diff) |
Added benchmark reporting.benchreport
Change timing_point to time.time interface.
Diffstat (limited to 'tools/certtools.py')
-rw-r--r-- | tools/certtools.py | 6 |
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 |