I want to measure the runtime of multiple threads in Momentics, like it is shown in the CPU usage view of the .kev
file. The only difference is, I don't want to see the time the thread was running in the whole diagnostics session, but between two custom placed User Events.
So I have
//Some code where multiple Threads are started/executed/interrupted and continued
TraceEvent(_NTO_TRACE_INSERTUSRSTREVENT, 101, "Start of measurement");
//Some code where multiple Threads are started/executed/interrupted and continued
TraceEvent(_NTO_TRACE_INSERTUSRSTREVENT, 102, "End of measurement");
//Some code where multiple Threads are started/executed/interrupted and continued
and want to get the sum of the runtime of all threads, but only in the time interval between by both user events.
Is there a way to do this in momentics?
Goal is to have an excel file with the runtimes, automated creation is not required here, but mentioned for clarification of the usecase.
Ideas I've already had:
- Coding
- rusage
- posix Time measurement
- the point with this is, I'm working on a huge system where I can't effortless find and modify the start and end of each Thread
- After Measurement
- some really dirty excel hack which takes the running and ready event of each thread and calculates the runtime