Solved

CD-Rom Benchmarking

Posted on 1998-07-17
14
174 Views
Last Modified: 2010-04-01
Could someone please tell me how to benchmark CDRom drives or possibly send me a snippet of example code? I'm trying to determine the speed of a drive, eg. 2x, 4x, 8x etc.
0
Comment
Question by:andypat
  • 7
  • 4
  • 3
14 Comments
 

Author Comment

by:andypat
ID: 1168041
I'd really appreciate an email from anyone who can help,
arpatterson@hotmail.com
andypat@lineone.net
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1168042
Well, I have a suggestion.  It might not be what you're looking for, but try this:

Get the current time, somehow, just make sure that it has precision into the milliseconds.

Open a file known to exist on the cd-rom.  Perhaps copy it to the hard drive in a temporary directory.

Get the current time again.  Subtract this time from the original, then you'll have the amount of time that it took to complete the copy.

I'm not sure how to actually implement any of that in c/c++ at this time, but if you do, that should provide the basic framework you need.
0
 
LVL 11

Expert Comment

by:alexo
ID: 1168043
Andy, what exactly are you trying to do?

http://web.idirect.com/~frank

0
ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 

Author Comment

by:andypat
ID: 1168044
Edited text of question
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1168045
Oh, that sheds a whole new light on things.  Sorry, I can't help it all for that one.
0
 
LVL 11

Expert Comment

by:alexo
ID: 1168046
NT, 95 or both?
0
 
LVL 11

Expert Comment

by:alexo
ID: 1168047
Suggestion:
1. Get timestamp.
2. Read n outermost tracks of the CD.
3. Get timestamp.
4. Read m innermost tracks of the CD.
5. Get timestamp.

Now you have two differences which let you approximate (because of various overheads) the max and min transfer rate of the CD.

Tell me the OS and I may have more info.
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1168048
How do you read one track at a time though?
0
 
LVL 11

Expert Comment

by:alexo
ID: 1168049
Depends on the OS.
On NT, you can use CreateFile() and DeviceIoControl() to access the CDROM directly.  See MS KB article Q138434.
On DOS, you can use the MSCDEX driver.
On Win95, this is a pain.  See MS KB article Q137813.

0
 

Author Comment

by:andypat
ID: 1168050
I'm trying to do this on NT, 95 & 98.
0
 
LVL 11

Accepted Solution

by:
alexo earned 200 total points
ID: 1168051
95 and 98 are the same.  NT is different.

First check the KB articles I mentioned above:
  http://support.microsoft.com/support/kb/articles/q138/4/34.asp
  http://support.microsoft.com/support/kb/articles/q137/8/13.asp

I'll post more references and pointers to code shortly.
0
 
LVL 11

Expert Comment

by:alexo
ID: 1168052
http://www.dejanews.com/getdoc.xp?AN=351196078 But I'm not sure it will work with a CD.

0
 
LVL 11

Expert Comment

by:alexo
ID: 1168053
Any specific reason for the low grade?
0
 

Author Comment

by:andypat
ID: 1168054
Sorry alexo, I'd had a bad day! I really appreciate your feedback. Thanks again!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C++ get user from AD  (VS6) 7 74
thread-safe code in c++ 2 101
Arduino EDI - Programming language 3 94
max float value 3 41
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question