I want to gather timing data for my route transitions. For example, if a user is on the /posts page, and transitions to the /favourites page, I’d like to capture the time between the time the transition begins and the time it ends, including model load time and rendering.
I thought about something like:
willTransition: function (transition) {
var startTime = +new Date();
transition.then(function () { console.log("Took " + (+new Date() - startTime)) });
}
but the times I’m getting are suspiciously short, and don’t appear to reflect the model load time.
Any thoughts?