2009-10-13 15:36:28 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace _ipdltest {
|
|
|
|
|
|
|
|
|
2010-02-04 19:40:42 -08:00
|
|
|
rpc protocol PTestLatency {
|
2009-10-13 15:36:28 -07:00
|
|
|
|
|
|
|
child:
|
2009-12-03 00:16:14 -08:00
|
|
|
__delete__();
|
2009-10-13 15:36:28 -07:00
|
|
|
Ping();
|
|
|
|
Ping5();
|
2010-02-04 19:40:42 -08:00
|
|
|
rpc Rpc();
|
2009-10-13 15:36:28 -07:00
|
|
|
|
|
|
|
parent:
|
|
|
|
Pong();
|
|
|
|
Pong5();
|
|
|
|
|
2010-01-11 21:46:17 -08:00
|
|
|
state START:
|
|
|
|
// if the timing resolution is too low, abort the test
|
|
|
|
send __delete__;
|
|
|
|
// otherwise, kick off the ping/pong trials
|
|
|
|
send Ping goto PONG;
|
|
|
|
|
2009-10-13 15:36:28 -07:00
|
|
|
// Trial 1: single ping/pong latency
|
|
|
|
state PING:
|
|
|
|
send Ping goto PONG;
|
|
|
|
send Ping5 goto PING4;
|
|
|
|
|
|
|
|
state PONG:
|
|
|
|
recv Pong goto PING;
|
|
|
|
|
|
|
|
// Trial 2: "overlapped" ping/pong latency
|
|
|
|
state PING5:
|
|
|
|
send Ping5 goto PING4;
|
2010-02-04 19:40:42 -08:00
|
|
|
call Rpc goto RPC;
|
2009-12-03 00:16:14 -08:00
|
|
|
|
2009-10-13 15:36:28 -07:00
|
|
|
state PING4: send Ping5 goto PING3;
|
|
|
|
state PING3: send Ping5 goto PING2;
|
|
|
|
state PING2: send Ping5 goto PING1;
|
|
|
|
state PING1: send Ping5 goto PONG1;
|
|
|
|
|
|
|
|
state PONG1: recv Pong5 goto PONG2;
|
|
|
|
state PONG2: recv Pong5 goto PONG3;
|
|
|
|
state PONG3: recv Pong5 goto PONG4;
|
|
|
|
state PONG4: recv Pong5 goto PONG5;
|
|
|
|
state PONG5: recv Pong5 goto PING5;
|
2010-02-04 19:40:42 -08:00
|
|
|
|
|
|
|
state RPC:
|
|
|
|
call Rpc goto RPC;
|
|
|
|
send __delete__;
|
2009-10-13 15:36:28 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
} // namespace _ipdltest
|