ipc/ipdl/test/cxx/PTestLatency.ipdl

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

michael@0 1
michael@0 2 namespace mozilla {
michael@0 3 namespace _ipdltest {
michael@0 4
michael@0 5
michael@0 6 intr protocol PTestLatency {
michael@0 7
michael@0 8 child:
michael@0 9 __delete__();
michael@0 10 Ping();
michael@0 11 Ping5();
michael@0 12 intr Rpc();
michael@0 13 Spam();
michael@0 14 intr Synchro();
michael@0 15 CompressedSpam(uint32_t seqno) compress;
michael@0 16 intr Synchro2() returns (uint32_t lastSeqno,
michael@0 17 uint32_t numMessagesDispatched);
michael@0 18
michael@0 19 parent:
michael@0 20 Pong();
michael@0 21 Pong5();
michael@0 22
michael@0 23 state START:
michael@0 24 // if the timing resolution is too low, abort the test
michael@0 25 send __delete__;
michael@0 26 // otherwise, kick off the ping/pong trials
michael@0 27 send Ping goto PONG;
michael@0 28
michael@0 29 // Trial 1: single ping/pong latency
michael@0 30 state PING:
michael@0 31 send Ping goto PONG;
michael@0 32 send Ping5 goto PING4;
michael@0 33
michael@0 34 state PONG:
michael@0 35 recv Pong goto PING;
michael@0 36
michael@0 37 // Trial 2: "overlapped" ping/pong latency
michael@0 38 state PING5:
michael@0 39 send Ping5 goto PING4;
michael@0 40 call Rpc goto RPC;
michael@0 41
michael@0 42 state PING4: send Ping5 goto PING3;
michael@0 43 state PING3: send Ping5 goto PING2;
michael@0 44 state PING2: send Ping5 goto PING1;
michael@0 45 state PING1: send Ping5 goto PONG1;
michael@0 46
michael@0 47 state PONG1: recv Pong5 goto PONG2;
michael@0 48 state PONG2: recv Pong5 goto PONG3;
michael@0 49 state PONG3: recv Pong5 goto PONG4;
michael@0 50 state PONG4: recv Pong5 goto PONG5;
michael@0 51 state PONG5: recv Pong5 goto PING5;
michael@0 52
michael@0 53 // Trial 3: lotsa RPC
michael@0 54 state RPC:
michael@0 55 call Rpc goto RPC;
michael@0 56 send Spam goto SPAM;
michael@0 57
michael@0 58 // Trial 4: lots of sequential asyn messages, which tests pipelining
michael@0 59 state SPAM:
michael@0 60 send Spam goto SPAM;
michael@0 61 call Synchro goto COMPRESSED_SPAM;
michael@0 62
michael@0 63 // Trial 5: lots of async spam, but compressed to cut down on
michael@0 64 // dispatch overhead
michael@0 65 state COMPRESSED_SPAM: // compressed spam, mmm
michael@0 66 send CompressedSpam goto COMPRESSED_SPAM;
michael@0 67 call Synchro2 goto DONE;
michael@0 68
michael@0 69 state DONE:
michael@0 70 send __delete__;
michael@0 71 };
michael@0 72
michael@0 73
michael@0 74 } // namespace mozilla
michael@0 75 } // namespace _ipdltest

mercurial