This article will help you to find out more information about Node.js –prof, since the following Node.js tutorial sheds light on profiling Node.js applications.
Calling something like “ulimit -n 8192” in your Node.js application runs a shell script before starting the service. Thus, running with Node.js –prof to generates the v8.log
1
node--prof--prof_lazy app.js
Note that there are tools in /node/deps/v8/ that in combination with this command
1
tools/linux-tick-processor path-of-v8.log
lead to the following results:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[Shared libraries]:
ticks total nonlib name
30.0%0.0%.../libc-2.13.so
[JavaScript]:
ticks total nonlib name
10.0%0.0%Stub:InstanceofStub
[C++]:
ticks total nonlib name
10.0%0.0%__write
...
[GC]:
ticks total nonlib name
150.0%
[Bottom up(heavy)profile]:
Note:percentage showsashare ofaparticular caller inthe total