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