From 27d8fe970c2102edb3fc5bc333b05f975e5ae2d3 Mon Sep 17 00:00:00 2001 From: mkaay Date: Sat, 12 Feb 2011 01:55:39 +0100 Subject: gui optimisations --- module/remote/thriftbackend/ThriftTest.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'module/remote/thriftbackend') diff --git a/module/remote/thriftbackend/ThriftTest.py b/module/remote/thriftbackend/ThriftTest.py index 8cfeb68d5..69ac6a745 100644 --- a/module/remote/thriftbackend/ThriftTest.py +++ b/module/remote/thriftbackend/ThriftTest.py @@ -30,10 +30,14 @@ def bench(f, *args, **kwargs): print "%s: %f s" % (f.__name__, e-s) return ret +from getpass import getpass +user = raw_input("user ") +passwd = getpass("password ") + server_url = "http%s://%s:%s@%s:%s/" % ( "", - "user", - "password", + user, + passwd, "127.0.0.1", 7227 ) @@ -42,8 +46,8 @@ proxy = xmlrpclib.ServerProxy(server_url, allow_none=True) bench(proxy.get_server_version) bench(proxy.status_server) bench(proxy.status_downloads) -bench(proxy.get_queue) -bench(proxy.get_collector) +#bench(proxy.get_queue) +#bench(proxy.get_collector) print try: @@ -62,13 +66,13 @@ try: # Connect! transport.open() - print "Login", client.login("User", "pyloadweb") + print "Login", client.login(user, passwd) bench(client.getServerVersion) bench(client.statusServer) bench(client.statusDownloads) - bench(client.getQueue) - bench(client.getCollector) + #bench(client.getQueue) + #bench(client.getCollector) print print client.getServerVersion() -- cgit v1.2.3