summaryrefslogtreecommitdiffstats
path: root/module/remote/thriftbackend/ThriftTest.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-02-11 21:30:41 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-02-11 21:30:41 +0100
commit899159508c24355903e37b31a009168a0129ca0d (patch)
tree4a5bcb51b64cadbe7986cda2814e6995682e2175 /module/remote/thriftbackend/ThriftTest.py
parentGUI updates, closed #181, updated XDCC, fixed FileSonic (diff)
downloadpyload-899159508c24355903e37b31a009168a0129ca0d.tar.xz
Thrift with SSL
Diffstat (limited to 'module/remote/thriftbackend/ThriftTest.py')
-rw-r--r--module/remote/thriftbackend/ThriftTest.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/remote/thriftbackend/ThriftTest.py b/module/remote/thriftbackend/ThriftTest.py
index 587ca184a..8cfeb68d5 100644
--- a/module/remote/thriftbackend/ThriftTest.py
+++ b/module/remote/thriftbackend/ThriftTest.py
@@ -16,13 +16,13 @@ from thrift.transport import TTransport
from Protocol import Protocol
-from time import sleep, time
+from time import time
import xmlrpclib
def bench(f, *args, **kwargs):
s = time()
- ret = [f(*args, **kwargs) for i in range(0,250)]
+ ret = [f(*args, **kwargs) for i in range(0,100)]
e = time()
try:
print "%s: %f s" % (f._Method__name, e-s)
@@ -48,7 +48,7 @@ print
try:
# Make socket
- transport = Socket('localhost', 7228)
+ transport = Socket('localhost', 7228, False)
# Buffering is critical. Raw sockets are very slow
transport = TTransport.TBufferedTransport(transport)
@@ -74,7 +74,7 @@ try:
print client.getServerVersion()
print client.statusServer()
print client.statusDownloads()
- q = client.getQueue()
+ q = client.getQueue()
for p in q:
data = client.getPackageData(p.pid)
@@ -85,4 +85,4 @@ try:
transport.close()
except Thrift.TException, tx:
- print 'ThriftExpection: %s' % (tx.message)
+ print 'ThriftExpection: %s' % tx.message