michael@0: michael@0: namespace mozilla { michael@0: namespace _ipdltest { michael@0: michael@0: michael@0: intr protocol PTestLatency { michael@0: michael@0: child: michael@0: __delete__(); michael@0: Ping(); michael@0: Ping5(); michael@0: intr Rpc(); michael@0: Spam(); michael@0: intr Synchro(); michael@0: CompressedSpam(uint32_t seqno) compress; michael@0: intr Synchro2() returns (uint32_t lastSeqno, michael@0: uint32_t numMessagesDispatched); michael@0: michael@0: parent: michael@0: Pong(); michael@0: Pong5(); michael@0: michael@0: state START: michael@0: // if the timing resolution is too low, abort the test michael@0: send __delete__; michael@0: // otherwise, kick off the ping/pong trials michael@0: send Ping goto PONG; michael@0: michael@0: // Trial 1: single ping/pong latency michael@0: state PING: michael@0: send Ping goto PONG; michael@0: send Ping5 goto PING4; michael@0: michael@0: state PONG: michael@0: recv Pong goto PING; michael@0: michael@0: // Trial 2: "overlapped" ping/pong latency michael@0: state PING5: michael@0: send Ping5 goto PING4; michael@0: call Rpc goto RPC; michael@0: michael@0: state PING4: send Ping5 goto PING3; michael@0: state PING3: send Ping5 goto PING2; michael@0: state PING2: send Ping5 goto PING1; michael@0: state PING1: send Ping5 goto PONG1; michael@0: michael@0: state PONG1: recv Pong5 goto PONG2; michael@0: state PONG2: recv Pong5 goto PONG3; michael@0: state PONG3: recv Pong5 goto PONG4; michael@0: state PONG4: recv Pong5 goto PONG5; michael@0: state PONG5: recv Pong5 goto PING5; michael@0: michael@0: // Trial 3: lotsa RPC michael@0: state RPC: michael@0: call Rpc goto RPC; michael@0: send Spam goto SPAM; michael@0: michael@0: // Trial 4: lots of sequential asyn messages, which tests pipelining michael@0: state SPAM: michael@0: send Spam goto SPAM; michael@0: call Synchro goto COMPRESSED_SPAM; michael@0: michael@0: // Trial 5: lots of async spam, but compressed to cut down on michael@0: // dispatch overhead michael@0: state COMPRESSED_SPAM: // compressed spam, mmm michael@0: send CompressedSpam goto COMPRESSED_SPAM; michael@0: call Synchro2 goto DONE; michael@0: michael@0: state DONE: michael@0: send __delete__; michael@0: }; michael@0: michael@0: michael@0: } // namespace mozilla michael@0: } // namespace _ipdltest