Reputation: 11
In Chrome dev tools, I only see sampling based profiling available. Are there any tools that allow one to do instrumentation based javascript profiling?
To clarify what I mean by instrumentation based profiling:
Sampling based profiling: This is the profiling available in Chrome where the profiler takes a sample of the stack trace at regular intervals to determine what functions are taking most time.
With instrumentation based profiling, instead of taking frequent samples, the profiler injects frequency counting code at entry and exit point of each function and at the end of profiling you can get the exact execution counts of the functions.
Upvotes: 1
Views: 874
Reputation: 29
Actually, Chrome provides both sampling and instrumenting (= structural) profilers, the latter being aimed at 'power users' and as such is pretty well hidden and not that easy to use (can be found in chrome://tracing). For more info on this, check out this Youtube session.
Probably a better option would be to use Google's Web Tracing Framework extension for Chrome, which is much more intuitive and doesn't require manual modifications to your code.
Upvotes: 2