Quantcast
Channel: How to implement efficient C++ runtime statistics - Stack Overflow
Viewing all articles
Browse latest Browse all 8

Answer by Thomas Matthews for How to implement efficient C++ runtime statistics

$
0
0

In embedded systems, a common technique is to reserve a block of memory for a "log" and treat it like a circular queue. Write some code that can read this block of memory; which will help take "snapshots" during run-time.

Search the web for "debug logging". Should turn up some source you could use to play with. Most shops I've been at usually roll their own.

Should you have extra non-volatile memory, you could reserve an area and write to that. This would also include files if your system is large enough to support a file system.

Worst case, write data out to a debug (serial) port.

For actual, real-time, measurements, we usually use an oscilloscope connected to a GPIO or test point and output pulses to the GPIO / Test point.


Viewing all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>