Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

131
Views
Is there a way to list all nodejs function execution time?

Is there a way to measure execution time of nodejs functions recursively? console.time and performance.mark can only get the total time, but what I want is to list all inner function's time, like this way:

function A() {
  B();
  C();
}
function B() {
  ...
}
function C() {
  ...
}

// some tool like timeit
timeit('A')
A();
timeit('A')

I wanna get the result like below:

A: 1000ms
- B: 400ms
- C: 600ms

and if there's any extensions in vscode can do it will be better, like in chrome we can see React Profiler

An Example of React Profiler to list all components execution time

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

There is a Node.js Profiler that can do that. You can find more information here https://nodejs.org/en/docs/guides/simple-profiling/

Also, it is possible to load the profiler output to Chrome to see nice visualization of the profiling data.

Apart from that, you could create a flame chart to analyze your application execution, for example here is a good guide https://betterprogramming.pub/create-a-flame-graph-for-your-node-app-profiling-nodejs-app-e0a91e5ed585

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!