Maybe add simple profiler?
Closed this issue · 3 comments
sergeysova commented
Usage
class UserPage extends Controller {
@Timer()
actionHome() {
this.render('user/home', { user: this.global.user });
}
}
Console:
Run UserPage.actionHome()
End UserPage.actionHome(): 3.765ms
pete-otaqui commented
I think there are a couple of issues with the way you create the timer:
- Nested calls may interfere with each other since they share a label
- console.time is not available in all browsers & js environments.
I'm also working on a version of this, will reply on this ticket shortly.
pete-otaqui commented
Here's the PR: