-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: #339 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <Michael_Dawson@ca.ibm.com>
- Loading branch information
1 parent
ca05202
commit 644ed33
Showing
5 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Profiling | ||
|
||
In this document you can learn about how to profile a Node.js process. | ||
|
||
- [Profiling](#profiling) | ||
- [My application has a poor performance](#my-application-has-a-poor-performance) | ||
- [Symptoms](#symptoms) | ||
- [Debugging](#debugging) | ||
|
||
## My application has a poor performance | ||
|
||
### Symptoms | ||
|
||
My applications latency is high and I have already confirmed that the bottleneck | ||
is not my dependencies like databases and downstream services. So I suspect that | ||
my application spends significant time to run code or process information. | ||
|
||
You are satisfied with your application performance in general but would like to | ||
understand which part of our application can be improved to run faster or more | ||
efficient. It can be useful when we want to improve the user experience or save | ||
computation cost. | ||
|
||
### Debugging | ||
|
||
In this use-case, we are interested in code pieces that use more CPU cycles than | ||
the others. When we do this locally, we usually try to optimize our code. | ||
|
||
- [Using V8 Profiler](./step1/using_v8_profiler.md) | ||
- [Using Linux Perf](./step2/using_linux_perf.md.md) | ||
- [Using Native Tools](./step3/using_native_tools.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
# Using V8 Sampling Profiler (--prof) | ||
|
||
V8 Profile (--prof) is the V8’s built-in sampling based profiler to track CPU | ||
Usage. 0x is an npm library that makes capturing and visualizing flamegraphs | ||
via --prof easier. | ||
|
||
## How To | ||
|
||
//TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Using Linux Perf | ||
|
||
Linux Perf provides low level CPU profiling with JavaScript, native and OS level frames. | ||
|
||
## How To | ||
|
||
// TODO | ||
|
||
## Useful Links | ||
|
||
- https://nodejs.org/en/docs/guides/diagnostics-flamegraph/ | ||
- [http://www.brendangregg.com/blog/2014-09-17/node-flame-graphs-on-linux.html](http://www.brendangregg.com/blog/2014-09-17/node-flame-graphs-on-linux.html) | ||
- https://github.com/mmarchini/node-linux-perf |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
# Native Tools | ||
|
||
System profilers (such as Linux perf, eBPF, DTrace, etc.) can sample the stack | ||
trace of applications and generate reports or graphs to help understand the code | ||
path our application is taking. | ||
|
||
## How To | ||
|
||
//TODO |