Skip to content

Instantly share code, notes, and snippets.

@tekkub
Created June 3, 2010 08:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tekkub/423628 to your computer and use it in GitHub Desktop.
Save tekkub/423628 to your computer and use it in GitHub Desktop.
Drive read throughput tester
#!/usr/bin/env ruby
f = ARGV.first
size = File.size f
puts "Reading #{size/1024/1024} MiB"
t = Time.now
File.read f
total_time = Time.now - t
puts "%.1f sec - %.2f MiB/sec" % [total_time, size/1024/1024/total_time]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment