My aim is to develop a java script profiler for nodejs . The requirements are as under :
- Should be able to fetch call stack .
- Get Time stamp information.
- Get number of iterations.
My chief concern is that i should not modify the source file ( .js file ) .
I have seen all the available profiling options for JavaScript code on node js . The problem i face is that most of them require manual injection of the profiling specific code into my source code. Here is an example
var profiler = new Profiler() // Need to create profiler in my .js file
profiler.startProfiling()
// My Code
profiler.endProfling()
Since most profilers require this kind of code injection. Can anyone suggest me any other profiling alternative (which will not need source code modification).
Currently i am using v8 functionality provided with node js to profile my JavaScript Code. For example
node --prof MyTestApp.js
This command gives me a v8.log . Here is a sample log
So here are my queries
- Can there be possible workaround for v8 , so that i can add timestamp information ,iteration count for functions
- Is there any other profiling tool (apart from v8) which could meet my requirement.
Help is appreciated
