Reputation: 41
I have a C program written in such a way that it takes a file name as input to read. Now the problem is i am using time/timex command on HPUX to know the exact performance or time elapsed during the complete execution of the program.
The problem is, i am not able to get the exact performance by these time/timex command due to the time taken during the input insertion for that program. time/timex command is also considering the time taken by the user to provide the input.
Can anyone please help me as to how should i measure the actual performance in such case where user is giving input which is required to run the program ?
Upvotes: 1
Views: 894
Reputation: 70691
time
reports both the real time and CPU time. The real time includes time spent waiting for input, but the CPU time (user + sys) should give you just the time actually spent by your program performing computations.
Upvotes: 1