View topic - How to get read time, read speed, write time, write speed?

How to get read time, read speed, write time, write speed?

anything that doesn't fit to other groups.

How to get read time, read speed, write time, write speed?

Postby alaipayuthe » Wed May 02, 2012 5:45 am

Hi all,

I am using QNX6.5.0. Is there any direct routine with which we can get the time taken by the last read command, its read speed, time taken by the last write command, its write speed etc programmatically using C++? I have routines like difftime() for calculating time difference? Is there any other alternatives?

Thanks,
Honey S
alaipayuthe
Active Member
 
Posts: 13
Joined: Fri Oct 16, 2009 7:01 am

Re: How to get read time, read speed, write time, write spee

Postby mario » Wed May 02, 2012 12:17 pm

Check out ClockCycles(), it's very very precise. That being said you still have to do the measurement yourself.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Re: How to get read time, read speed, write time, write spee

Postby alaipayuthe » Thu May 03, 2012 1:41 pm

Ok. Thank you Mario. I will check that API.

Regards,
Honey S
alaipayuthe
Active Member
 
Posts: 13
Joined: Fri Oct 16, 2009 7:01 am

Re: How to get read time, read speed, write time, write spee

Postby maschoen » Fri May 04, 2012 7:22 am

You might want to be aware that while read times have validity, write times usually do not.
When you do a write in QNX 4 you are just copying the data to the file system cache. The file system
writes the data from the cache to disk asynchronously. You could probably first fill up the cache to get an idea on the actual transfer speed if you are interested in the overall write throughput.
maschoen
QNX Master
 
Posts: 2715
Joined: Wed Jun 25, 2003 5:18 pm


Return to General Programming

Who is online

Users browsing this forum: No registered users and 9 guests

cron