by bogwog · 1y ago · 0 comments
https://github.com/jonasmr/microprofile
Btw, I recently worked with a library that had their own profiler which generated a Chrome trace file, so you could load it up in the Chrome dev tools to explore the call graph and timings in a fancy UI.
It seems like such a good idea and I wish more profiling frameworks tried to do that instead of building their own UI.
As far as differences go:
Microprofile:
- frame-based
- needs a build system
- memory usage starts at 2 MB per thread
- runs 2 threads of its own
- provides system-specific info
- good support for GPU workloads
- provides live view
- seems like a good choice for gamedev / rendering
utl::profiler: - no specific pipeline
- single include
- memory usage starts at approx. nothing and would likely stay in kilobytes
- doesn't run any additional threads
- fully portable, nothing platform specific whatsoever, just standard C++
- doesn't provide system-specific info, just pure timings
- seems like a good choice for small projects or embedded (since the only thing it needs is a C++ compiler)