I want to measure the duration of a TCP/UDP packet from network to process.
Let's say that I develop a Linux process, which provides a kind of web service. My process is listening on the port 8999 and expecting some HTTP request. If I'm right, a HTTP request will first enter into the network of my machine and then will be moved from the network to my process by the Kernel. What I need is to measure this duration.
Is there some common method or tool to do so?