
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
"test" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Could someone tell me know how to calculate MIPS being used by an
> existing application, on an existing processor?
>
> I'm not looking for raw processor power available (so benchmark pgms
> won't do). We have an application (real-time, infinte loop) running on
> the processor, and want to know how busy the processor is on an
> average. It would suffice even if we could only determine the
> worst-case utilization. The application runs on pSOS on M68K.
>
> Thanks,
> Test
How about a 'working' flag and two counters?
- When in the idle loop, set the flag to 'idle'
- When entering any activity, set the flag to 'at work'
- Use a timer interrupt at some arbitrary interval.
- In the ISR do something like:
void TimerIsr(void)
{
if(working) atwork++;
else idling++;
}
This should give you a reasonable indication what percentage of time is
spent.
Rob
| <-- __Chronological__ --> | <-- __Thread__ --> |