Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grimmer0125/node_test_profiler
Use v8 built-in profiler on Node.js
https://github.com/grimmer0125/node_test_profiler
nodejs
Last synced: 7 days ago
JSON representation
Use v8 built-in profiler on Node.js
- Host: GitHub
- URL: https://github.com/grimmer0125/node_test_profiler
- Owner: grimmer0125
- Created: 2019-06-21T08:39:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T19:46:15.000Z (about 2 years ago)
- Last Synced: 2024-12-22T00:23:16.373Z (2 months ago)
- Topics: nodejs
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node Test Profiler
## Steps
1. `NODE_ENV=production node --prof app.js`
2. `node --prof-process isolate-0x[Number]-v8.log > processed.txt`
3. `node --prof-process --preprocess isolate-0x[Number]-v8.log > v8.json`
4. `git clone https://github.com/v8/v8.git`
5. open v8/tools/profview/index.html
6. select v8.json
7. run ref#2 to get tick info. p.s. totoal ticks may apply on multiple-core## ref
1. https://nodejs.org/uk/docs/guides/simple-profiling/ crypto.pbkdf2 and crypto.pbkdf2Sync both spwan a worker thread (`___pthread_init`) but the latter will make JS main thread to wait for the result for pthread
2. to get how many ticks in 1 second:
1. `gcc getticktime.c`
2. ./a.out