NodeJS MySQL: measure query execution time
I'm on a shared hosting platform and would like to throttle the queries in my app so that if the total execution time exceeds a certain amount over a variable time period then I can make the app cool off and then resume later on. To do this I would like to find out how long each of my queries take in real time and manage it within the app and not by profiling it externally. I've seen examples in PHP where the time is recorded before and after the query ( even phpMyAdmin does this ), but this won't work in NodeJS or anything that runs the query asynchronously. So the question is: how would I go