Enrico Susatyo
Enrico Susatyo

Reputation: 19790

Calculating disk speed in OS X

Is there any cocoa API or open source library that enable me to check the disk read/write speed in OS X?

Something like what this app (in Mac App Store) uses.

Upvotes: 2

Views: 663

Answers (1)

Nathan
Nathan

Reputation: 7032

As best I can tell, that app writes and reads a known amount of data (the user selects from 1, 2, 3, 4, and 5 GB) and times how long it takes.

I imagine that the 'live' read/write times are based on a running average: "in the last 5 seconds I've written XXX MB".

I'm not aware of an API to implement something like this yourself, but you could do it fairly easily: generate a known amount of garbage (e.g. 500MB of random numbers), write it to a temporary folder, time it, do your calculations, then clean up the written data.

Upvotes: 2

Related Questions