Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

125
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda