repo.or.cz
/
jruby.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Fix for JRUBY-2882. Handle error messages related to constructors better
[jruby.git]
/
bench
/
yarv
/
bm_io_file_read.rb
blob
488a4e90ad74b393e7bda56eacc44fa052c22ce5
1
#
\r
2
# Seek and Read file.
\r
3
#
\r
4
\r
5
require 'tempfile'
\r
6
\r
7
max = 20_000
\r
8
str = "Hello world! " * 1000
\r
9
f = Tempfile.new('yarv-benchmark')
\r
10
f.write str
\r
11
\r
12
max.times{
\r
13
f.seek 0
\r
14
f.read
\r
15
}
\r