I have a workload where I have a server and a client, both under my control. They communicate via a TCP connection using Netty 4.1. The state diagram looks like this:
Server Client
params = f();
-->
res = compute(params);
<--
store(res);
I want to measure the time they spend communicating via the network. This means I want the total runtime minus the runtimes of f, compute and res. But, in reality it's more complicated, so I can't measure all the other parts of my program reliably.
Can I measure the time netty takes for the transfer? If yes, how so?