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](http://itunes.apple.com/au/app/blackmagic-disk-speed-test/id425264550?mt=12) (in Mac App Store) uses.