summaryrefslogtreecommitdiff
path: root/benchmark/io_file_read.yml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/io_file_read.yml')
-rw-r--r--benchmark/io_file_read.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/benchmark/io_file_read.yml b/benchmark/io_file_read.yml
new file mode 100644
index 0000000..f8f0c1c
--- /dev/null
+++ b/benchmark/io_file_read.yml
@@ -0,0 +1,18 @@
+benchmark:
+ io_file_read: |
+ #
+ # Seek and Read file.
+ #
+
+ require 'tempfile'
+
+ max = 200_000
+ str = "Hello world! " * 1000
+ f = Tempfile.new('yarv-benchmark')
+ f.write str
+
+ max.times{
+ f.seek 0
+ f.read
+ }
+loop_count: 1