diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-12-05 17:05:58 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-12-05 17:05:58 +0000 |
commit | 328b5e8bedf549f6f8b76648fa5652ee7c17559b (patch) | |
tree | 88430fa5468a62108eb61d386e55f61e3bebc46c | |
parent | Added warmup to java demo (diff) | |
download | ice-328b5e8bedf549f6f8b76648fa5652ee7c17559b.tar.bz2 ice-328b5e8bedf549f6f8b76648fa5652ee7c17559b.tar.xz ice-328b5e8bedf549f6f8b76648fa5652ee7c17559b.zip |
Added warmup to java throughput
-rw-r--r-- | py/demo/Ice/throughput/Client.py | 2 | ||||
-rw-r--r-- | py/demo/Ice/throughput/Server.py | 25 | ||||
-rw-r--r-- | py/demo/Ice/throughput/Throughput.ice | 2 |
3 files changed, 24 insertions, 5 deletions
diff --git a/py/demo/Ice/throughput/Client.py b/py/demo/Ice/throughput/Client.py index f1666a3038d..3a628ddb08c 100644 --- a/py/demo/Ice/throughput/Client.py +++ b/py/demo/Ice/throughput/Client.py @@ -69,7 +69,7 @@ class Client(Ice.Application): menu() - throughput.ice_ping() # Initial ping to setup the connection. + throughput.endWarmup() # Initial ping to setup the connection. currentType = '1' seqSize = Demo.ByteSeqSize diff --git a/py/demo/Ice/throughput/Server.py b/py/demo/Ice/throughput/Server.py index 30d42e60b4a..9b1f9b8d61b 100644 --- a/py/demo/Ice/throughput/Server.py +++ b/py/demo/Ice/throughput/Server.py @@ -15,6 +15,8 @@ import Demo class ThroughputI(Demo.Throughput): def __init__(self): + warmup = True + bytes = [] bytes[0:Demo.ByteSeqSize] = range(0, Demo.ByteSeqSize) bytes = ['\x00' for x in bytes] @@ -39,11 +41,17 @@ class ThroughputI(Demo.Throughput): self.fixedSeq[i].j = 0 self.fixedSeq[i].d = 0.0 + def endWarmup(self, current=None): + self.warmup = False + def sendByteSeq(self, seq, current=None): pass def recvByteSeq(self, current=None): - return self.byteSeq + if self.warmup: + return [] + else: + return self.byteSeq def echoByteSeq(self, seq, current=None): return seq @@ -52,7 +60,10 @@ class ThroughputI(Demo.Throughput): pass def recvStringSeq(self, current=None): - return self.stringSeq + if self.warmup: + return [] + else: + return self.stringSeq def echoStringSeq(self, seq, current=None): return seq @@ -61,7 +72,10 @@ class ThroughputI(Demo.Throughput): pass def recvStructSeq(self, current=None): - return self.structSeq + if self.warmup: + return [] + else: + return self.structSeq def echoStructSeq(self, seq, current=None): return seq @@ -70,7 +84,10 @@ class ThroughputI(Demo.Throughput): pass def recvFixedSeq(self, current=None): - return self.fixedSeq + if self.warmup: + return [] + else: + return self.fixedSeq def echoFixedSeq(self, seq, current=None): return seq diff --git a/py/demo/Ice/throughput/Throughput.ice b/py/demo/Ice/throughput/Throughput.ice index 5beaf1a9525..d17a45da393 100644 --- a/py/demo/Ice/throughput/Throughput.ice +++ b/py/demo/Ice/throughput/Throughput.ice @@ -38,6 +38,8 @@ const int FixedSeqSize = 50000; interface Throughput { + void endWarmup(); + void sendByteSeq(ByteSeq seq); ByteSeq recvByteSeq(); ByteSeq echoByteSeq(ByteSeq seq); |