Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nodejs Profiling: What to do with v8.log file

Tags:

Only thing I have installed is Nodejs. I'm using Windows 8 x64.

I run my program via node --prof app.js. It generates a v8.log file.

Now, what do I do with the v8.log file?

like image 710
RainingChain Avatar asked Jan 26 '14 00:01

RainingChain


People also ask

What is V8 profiler?

V8 CPU and memory profiling Last modified: 25 July 2022. With WebStorm, you can capture and analyze CPU profiles and heap snapshots for your Node. js applications using V8's sample-based profiler. You can also open and explore snapshots captured in Google Chrome DevTools for your client-side code.

What does V8 do in node js?

The V8 engine is what powers Node. js and it is an open-source engine on which even Chrome works. It parses and runs your JavaScript inside a Node environment.

What is profiling in node js?

Node. js profiling allows you to use the profiler already available to you (--prof) through the Node. js program and discover performance-related issues within your application. With this profiler, you'll be able to delve into the performance of your application and find what's causing bottlenecks.

CAN node js use other engines than V8?

No. The current node. js binary cannot work without V8. It would have no Javascript engine and thus no ability to run code which would obviously render it non-functional.


2 Answers

Starting with v5.2.0, Node.JS ships with a built-in tick processor:

node --prof-process

See the release notes for more information.

like image 133
quibusus Avatar answered Apr 02 '23 15:04

quibusus


Chrome's built-in Trace Event Profiling Tool (accessible in Chrome or Chromium at chrome://tracing) can build more-useful visualizations around v8.log output.

Note that dumps from node >= 0.11.x may be more useful to you than those on the current stable release (0.10.35).

like image 26
rjz Avatar answered Apr 02 '23 14:04

rjz