Users have been reporting that my existing single-page web application is not performing well, but unfortunately I can't change the code. To address this issue, I want to track the loading time in the following manner:
- Record the timestamp of when a user clicks on the page
- Record the timestamp of when the page rendering is completed, including ajax requests and other JavaScript functions
- Calculate the difference between the two timestamps and send it back to the server
I know how to handle steps 1 and 3 using jQuery, but I'm unsure about the best approach for step 2.
Since this seems like a common scenario, is there a standard toolset available for monitoring performance like this?