Need statistical data of code execution

Asked By 0 points N/A Posted on -
qa-featured

How can one obtain the statistical data of the time spent by a program in executing its code? Is it an important factor to be considered during programming? Please suggest.

SHARE
Answered By 15 points N/A #107759

Need statistical data of code execution

qa-featured

Hello Carl_Nassar,

I guess it is possible for you to do that. You can use a performance monitoring counter register, which in this case will monitor the number of instructions that have just retired from execution.

Though this method may pose some challenges, for instance taking into considerations some instructions that may be undercounts which may occur if the system happens to be executing only half an instruction. In a case like this you might want to ignore those minor mishaps because the process itself is more of estimation.

In some languages the number of instructions for a line of code will tend to depend on the context of the string, and thus may end not only being huge but vary from time to time.

__

Regards
Clair Charles

 

Related Questions