File writing speed

Does anyone knows how Ruby can determine, knwoing the file size in MB,
the speed of a file writing? ie I need to know how seconds PC needs to
write a file in HD…

$ time ruby -e “a = File.open(‘yo’, ‘w’); a.seek 10_000_000_000; a.write
‘b’”

but I’m not sure if this is good enough…