diff options
Diffstat (limited to 'py/demo/Ice/latency/Client.py')
-rw-r--r-- | py/demo/Ice/latency/Client.py | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/py/demo/Ice/latency/Client.py b/py/demo/Ice/latency/Client.py index 8e185e19efc..fd6cf0b705e 100644 --- a/py/demo/Ice/latency/Client.py +++ b/py/demo/Ice/latency/Client.py @@ -15,31 +15,31 @@ import Demo class Client(Ice.Application): def run(self, args): - ping = Demo.PingPrx.checkedCast(self.communicator().propertyToProxy('Latency.Ping')) - if not ping: - print "invalid proxy" - return False + ping = Demo.PingPrx.checkedCast(self.communicator().propertyToProxy('Latency.Ping')) + if not ping: + print "invalid proxy" + return False - # Initial ping to setup the connection. - ping.ice_ping(); + # Initial ping to setup the connection. + ping.ice_ping(); - repetitions = 100000 - print "pinging server " + str(repetitions) + " times (this may take a while)" + repetitions = 100000 + print "pinging server " + str(repetitions) + " times (this may take a while)" - tsec = time.time() + tsec = time.time() - i = repetitions - while(i >= 0): - ping.ice_ping() - i = i - 1 + i = repetitions + while(i >= 0): + ping.ice_ping() + i = i - 1 - tsec = time.time() - tsec - tmsec = tsec * 1000.0 + tsec = time.time() - tsec + tmsec = tsec * 1000.0 - print "time for %d pings: %.3fms" % (repetitions, tmsec) - print "time per ping: %.3fms" % (tmsec / repetitions) + print "time for %d pings: %.3fms" % (repetitions, tmsec) + print "time per ping: %.3fms" % (tmsec / repetitions) - return True + return True app = Client() sys.exit(app.main(sys.argv, "config.client")) |