0

I have Rest server which returns a response. My target is to measure response, for this purpose i use two approaches:

  1. Addon in Google chrome Advanced Rest client
  2. Network tab in google chrome

My problem is that response time is different - Network tab in google chrome shows +3 seconds to time which was measured in Advanced Rest client.

A B
  • 8,340
  • 2
  • 31
  • 35
pacman
  • 797
  • 10
  • 28

1 Answers1

1

I can't speak for the Chromium team but I can speak for the Advanced REST Client - as an author of the tool.

ARC is operating directly on the socket. It uses low-level timing API to measure the time between different events (like time to first byte). These timings - for example - doesn't count the time to read the response on the client. Meaning, the library that is responsible for transport passes buffer instead of text to the app so it works faster. XHR has additional methods to check the response type and depending on it transforms the response to string, buffer or XML document. I can only guess that it counts to the overall time of the execution.

Anyway, ARC went down to the lowest possible APIs to measure the timings very precisely. If you want to dig more about this you can check this line in the transport library: https://github.com/advanced-rest-client/socket-fetch/blob/stage/app.fetch.js#L487 This is an example of how the timings are calculated (here connect time). Overall time is just a sum of all these timings (+ redirections if any).

Pawel Uchida-Psztyc
  • 3,735
  • 2
  • 20
  • 41
  • What tools does you usually use for measuring response time from the server? It's just curious. –  Jan 07 '17 at 11:42
  • @rukavitsya I don't use any tools because the app does not have access to the server :) It computes time elapsed between sending the last byte of the request message and receiving the first byte of the message. It's not really the real server response time because it doesn't include transport time but it's next best thing you can get. – Pawel Uchida-Psztyc Jan 07 '17 at 11:51
  • @ Paweł Psztyć Can I measure the absolute performance boost of specific rest endpoint via ARC? –  Jan 07 '17 at 11:53
  • @rukavisya if you made several request you'll see and API Assistant on the request panel of the app. There are performance charts of this timing information. – Pawel Uchida-Psztyc Jan 07 '17 at 11:55
  • @ Paweł Psztyć So all the same, is ARC eligible for measuring performance boost of the rest endpoint, or i must choose something like `jMeter` for this purpose? –  Jan 07 '17 at 11:59
  • @eukavitsya It is working all the time. You don't need to do anything. The data are processed locally and not exposed to any other party. – Pawel Uchida-Psztyc Jan 07 '17 at 12:02
  • It means that answer to my question about performance comparing is yes, ARC is suitable for this target, is not it? –  Jan 07 '17 at 12:06
  • 1
    @rukavitsya I believe it is. However don't hesitate to contact me about any requirements for this because I'm going to put a lot of effort in developing this area. – Pawel Uchida-Psztyc Jan 07 '17 at 12:21
  • @ Paweł Psztyć thx a lot, how can I get in touch with you in the case of the questions (I mean way of communication - email, gitter, chat on stackoverflow)? –  Jan 07 '17 at 12:55
  • The issue tracker would be the best place to start. In the app you have a "bug" button which will take you directly there. It's the most efficient way of communication with me. I may not read emails working some time but I'm on github everyday. – Pawel Uchida-Psztyc Jan 07 '17 at 12:57