summaryrefslogtreecommitdiffstats
path: root/tests/APIExerciser.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-12 02:17:30 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-12 03:22:32 +0200
commit000426c9d890ba2a71625a7454f9c573f10b9bae (patch)
tree8fa66da5061b850778f72f84038d9bb8bfa31f2f /tests/APIExerciser.py
parent'from os' -> 'import os' and so on... (diff)
downloadpyload-000426c9d890ba2a71625a7454f9c573f10b9bae.tar.xz
'from time' -> 'import time' and so on...
Diffstat (limited to 'tests/APIExerciser.py')
-rw-r--r--tests/APIExerciser.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/APIExerciser.py b/tests/APIExerciser.py
index 25eb666d7..02bfef20d 100644
--- a/tests/APIExerciser.py
+++ b/tests/APIExerciser.py
@@ -7,10 +7,10 @@ import gc
import random
import string
import threading
+import time
import traceback
from math import floor
-from time import time
from pyload.remote.thriftbackend.ThriftClient import ThriftClient, Destination
@@ -48,7 +48,7 @@ class APIExerciser(threading.Thread):
self.setDaemon(True)
self.core = core
self.count = 0 #: number of methods
- self.time = time()
+ self.time = time.time()
self.api = ThriftClient(user=user, password=pw) if thrift else core.api
@@ -84,11 +84,11 @@ class APIExerciser(threading.Thread):
if not sumCalled % 1000: #: not thread safe
self.core.log.info("Exercisers tested %d api calls" % sumCalled)
- persec = sumCalled / (time() - self.time)
+ persec = sumCalled / (time.time() - self.time)
self.core.log.info("Approx. %.2f calls per second." % persec)
self.core.log.info("Approx. %.2f ms per call." % (1000 / persec))
self.core.log.info("Collected garbage: %d" % gc.collect())
- # sleep(random() / 500)
+ # time.sleep(random() / 500)
def testAPI(self):