Reputation: 1061
With a tool like karma-coverage, we can modify dynamically the javascript AST to get code coverage.
Would it be possible to use the same strategy (alter code dynamically)
to track each JavaScript invocation and return.
Is anybody has an idea how to do that ?
I found tools like istanbul or esprima but they are used only for coverage.
Update 1 :
For each function invocation i want to have :
the timestamp of invocation of the function and the timestamp of the end of invocation of the function
Upvotes: 0
Views: 88
Reputation: 2814
YUI is now a dead project, but if I remember right, they had an external profiler in JS with an API that you can use to build your own reports.
http://postdocs.stanford.edu/Templates/yui-3.5.0/api/classes/Profiler.html
Upvotes: 1