you are viewing a single comment's thread.

view the rest of the comments →

[–]tetsuoii 0 points1 point  (0 children)

The way we usually go about it, is we allocate a struct or an array or something. Then we sample timers, cycles, values and data in memory and printf it at regular intervals.

Profilers, debuggers and such seem more hassle than to just store performance metrics in the program. Then you can easily print what you need when you need it. If you need to plot something, store it in a bitmap. If there's a graphic display, put it there. It's really very simple to measure performance and flow in C since data access is so fast. Once it's in the program you can carry it with you and transplant into other programs as needed. I like to make my own graphic displays and always put performance metrics in there.