Sign In Register

How can we help you today?

Start a new topic
Answered

What is difference between Javascript Execution Time and Response time?

Looking at this graph, you can see the javascript execution time going down - but response time going up.

What does "Response Time" measure that Javascript execution time does not?

times.png
(220 KB)

Best Answer

 Hey Jeff,

Looking at that chart i think that there may have been something wrong with the cluster during that time.

It wouldn't be possible that the average no of players plus script execution goes down while the response time goes up.
Without seeing more data from that time-period, i can only assume that the cluster may have been having trouble handling a high number of connections, which delayed the response queue.

To clarify your question though....

The response time is from when a request hits the server to when we send off the response.
The execution time is the time spend processing the request. Although some requests don't have scripts attached, there is still JS code preforming some operations under-the-hood that can affect those values. This plus server-load, processor resources and bandwidth-usage will affect the response and script execution times.

Sean


Answer

 Hey Jeff,

Looking at that chart i think that there may have been something wrong with the cluster during that time.

It wouldn't be possible that the average no of players plus script execution goes down while the response time goes up.
Without seeing more data from that time-period, i can only assume that the cluster may have been having trouble handling a high number of connections, which delayed the response queue.

To clarify your question though....

The response time is from when a request hits the server to when we send off the response.
The execution time is the time spend processing the request. Although some requests don't have scripts attached, there is still JS code preforming some operations under-the-hood that can affect those values. This plus server-load, processor resources and bandwidth-usage will affect the response and script execution times.

Sean

sorry - just to clarify - the Response time actually measures the amount of time it takes to get to the client?

So do I understand correctly, that in case of custom Cloud Scripts where there is no "Response" or "Request" cloud code attached to them ( as these are only attached to system API calls) should JS Execution Time and Response time be the same?


Hi Jeff, 


JS Execution time would vary depending on the amount of instructions being carried out by the script in question. Where as Response Time, although also potentially lengthened due to a long execution time within a Requests Cloud Code, would be affected by server load. 


So where scripts themselves may be efficient or lean in the instructions carried out, the response time may be lengthened due to the level of frequency at which requests are hitting the server, or indeed by other, non efficient Requests should there be any. 


Does that make sense? 


Happy to assist further - Patrick. 

so why would js execution time go down - but response time go up?

Hi Jeff, 


The difference between these two metrics is subtle. However the former indicates the time it took for the cloud code associated with a Request to run while the latter indicates the time taken to receive a response from the server. 


Happy to help - Patrick. 

Login to post a comment