Question 1: You can probably find existing test cases with some use of Google. But if there are special situations that you need to deal with, then it probably makes sense to write your own so that you take this into account.
Question 2: Perhaps there is an official definition of βlatencyβ with respect to network operations, but I think what really matters is the cost of a round trip. Thus, I would not divide by 2. The total cost of a round trip is what the user (client) is experiencing. It will be the latency that they see.
Question 3: I think your plan to use different packet sizes is good for measuring throughput. There is another SO question related to this. I sent an answer to this question and provided some numbers from my own testing of UDP compared to TCP. This may be of interest as a sanity checkpoint.
A - I forgot one thing that I would like to mention. If you write a very simple test case with UDP, this may be somewhat unrealistic. If you use UDP directly, you will need to add your own error handling, packet checking, etc. This will increase the cost. In the end, we find that UDP is faster in most situations for us because we adapted it for our own use. But for this, of course, much more code is required for everything to work correctly.
source share