Skip to content

Instantly share code, notes, and snippets.

@rxin
Created March 14, 2013 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rxin/5159238 to your computer and use it in GitHub Desktop.
Save rxin/5159238 to your computer and use it in GitHub Desktop.
def testWrite(path: String): Long = {
val startTime = System.currentTimeMillis()
val out = new java.io.FileWriter(path)
var i = 1
val bytes = " " * (1024 * 1024)
while (i < 1000) {
out.write(bytes)
i += 1
}
out.close
System.currentTimeMillis() - startTime
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment