Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when run node with --prof the crypto.pbkdf2 will not loged in #8439

Closed
chaosforfun opened this issue Sep 8, 2016 · 2 comments
Closed

when run node with --prof the crypto.pbkdf2 will not loged in #8439

chaosforfun opened this issue Sep 8, 2016 · 2 comments
Labels
performance Issues and PRs related to the performance of Node.js. question Issues that look for answers. v8 engine Issues and PRs related to the V8 dependency.

Comments

@chaosforfun
Copy link

Version 6.5.0
Platform: ubuntu 64-bit

i have a process which invoke crypto.pbkdf2 to encrypt password. and it will let the cpu 390%.so i use
node --prof and node --prof-process to profile, but in the log file ,crypto.pbkdf2 did not take up lot cpu time.

if I small the iterations param of crpto.pbkdf2 ,this process will not take up log cpu time, and if i set bigger iterations it will take up a lot cpu time.so i am sure this function take a log cpu time, but why it did non show in the log of node --prof.

  • Version:
  • Platform:
  • Subsystem:
@mscdex mscdex added question Issues that look for answers. v8 engine Issues and PRs related to the V8 dependency. performance Issues and PRs related to the performance of Node.js. labels Sep 8, 2016
@Fishrock123
Copy link
Contributor

@chaosforfun can you post some of your code and a processed profile? (output from --prof-process)

@bnoordhuis
Copy link
Member

Not a bug. The profiler only profiles the main thread (the thread executing JS). The asynchronous version of crypto.pbkdf2() runs in the thread pool and hence doesn't show up in the profiler. You won't see crypto.randomBytes() or any of the zlib functions for the same reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Issues and PRs related to the performance of Node.js. question Issues that look for answers. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

4 participants