Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

126
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda