Unanswered question

How to set a timer around a GET call to an API endpoint?

I have a very simple script, one GET call to an API endpoint.

It takes an ID number and returns payload of demographics.

Script runs but because it is just a single call i dont get times in the results.

I just want to know how long each GET/Response took similar to what you would get for a page request.

Is there an easy way to do this or can a timer be placed before and after call to record rough time?

Thanks

David

David M.
David M.

David M.

Level
0
4 / 100
points

Answers

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

Even if you have a single request NeoLoad will provide the same statics as for a page meaning that you can get the min/avg/max response times. For both requests and pages it will be agreggated data.

If you want to get the response time for all the individual executions of your request you can put it inside a transaction assuming that you have only that request in that transaction.

In that case you will be able to get the raw data statistics at the transaction level meaning all the response time will be stored for all the request executions. You can export those raw data in the Values tab of the Results section.

Be aware that keeping the raw data may increase a lot the result size. So if you do that on one request it's fine but do not do that for lot's requests especially if the number of hits is huge.