This PR sets up the AS:N subscription once during app init and then uses thread local variables to track the durations. Subscribing and unsubscribing on each request is not the right way to handle this. I'd love to write some tests for this as well but for now this will have to do.
I also threw in the view time a la Rails where they take the total time and subtract out the db time to get the view time.
This PR sets up the AS:N subscription once during app init and then uses thread local variables to track the durations. Subscribing and unsubscribing on each request is not the right way to handle this. I'd love to write some tests for this as well but for now this will have to do.
I also threw in the
view
time a la Rails where they take the total time and subtract out thedb
time to get theview
time.