Hi, I would like to know if there is any way to measure how much time does an endpoint takes since it receives a request until it responds. I've been trying using the moment() module but it doesn't seem to give a constant time.
You can accurately determine the execution time for the custom endpoint by using moment module in BL to print start time at the start of the execution and end time right before response.complete/response.error is called.
If you are calling third party services for data or doing other asynchronous activities, the execution time will differ a little every time depending on time taken to complete such tasks.
Can you answer a couple of my questions: