¿Qué herramienta puedo usar para rastrear la eficiencia de cada función en un programa C++?
Frecuentes
Visto 65 veces
0
I am now developing a relatively large C++ program, which is composed of several functions. The C++ program will run these functions sequentially. What I want to know is how much time and how much memory each function would occupy. For the time consumption one solution is use the BOOST::Timer library. For the memory usage, however, I cannot find right library to do the job. I was wondering whether you have some ideas on this question. Moreover, does someone know some tools that can create a program efficiency report similar to MATLAB profile? ¡Gracias!
1 Respuestas
2
You didn't specify your OS or compiler. What you want is generally known as a perfilador. Using timer for profiling is not a good idea. For memory profiling look for "heap-profiler".
If available for your platform, I'd recomend valgrind's macizo heap-profiler and optionally visualizador de macizos.
Respondido 28 ago 12, 15:08
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas c++ or haz tu propia pregunta.