How To Compute HTTP request processing time without network latency?

Because of geographic distance between server and client network latency can vary a lot. So I want to get "pure" req. processing time of service without network latency.

I want to get network latency as TCP connecting time. As far as I understand this time depends a lot on network.

Main idea is to compute:

  • TCP connecting time,
  • TCP first packet receive time,
  • Get "pure" service time = TCP first packet receive (waiting time) – TCP connecting.
  • I divide TCP connecting by 2 because in fact there are 2 requests-response (3-way handshake).

    I have two questions:

  • Should I compute TCP all packets receive time instead of only first packet?
  • Is this method okay in general?
  • PS: As a tool I use Erlang's gen_tcp. I can show the code.


    If at all, i guess the "pure" service time = TCP first packet receive - TCP connecting.. You have written other way round.

    A possible answer to your first questions is , you should ideally compute atleast some sort of average by considering pure service time of many packets rather than just first packet.

    Ideally it can also have worst case, average case, best case service times.

    For second question to be answered we would need why would you need pure service time only. I mean since it is a network application, network latencies(connection time etc...) should also be included in the "response time", not just pure service time. That is my view based on given information.

    链接地址: http://www.djcxy.com/p/69772.html

    上一篇: 以质量= 100比原始文件大的文件压缩位图

    下一篇: 如何计算没有网络延迟的HTTP请求处理时间?