import time import random from SimpleXMLRPCServer import SimpleXMLRPCServer import xmlrpclib def get_time(): time.sleep(random.random()) return time.time() def get_random_number(low, high): time.sleep(random.random()) return random.randint(low, high) server = SimpleXMLRPCServer(("localhost", 8877)) print "Listening on port 8877..." server.register_function(get_time, "get_time") server.register_function(get_random_number, "get_random_number") server.serve_forever()
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 21680 | Robert Cowham |
Populate -o //guest/robert_cowham/p4benchmark/main/locust/... //guest/robert_cowham/p4benchmark/github/locust/.... |
||
//guest/robert_cowham/p4benchmark/main/locust/examples/custom_xmlrpc_client/server.py | |||||
#1 | 19772 | Robert Cowham | Initial version of locust |