aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/io_file_write.yml
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-08 17:36:26 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-08 17:36:26 +0000
commit62284f736a6280eb17168b4d561add2e708ff0a9 (patch)
treed0dbe8fb5b5431a6447216dd31390962a8b521cc /benchmark/io_file_write.yml
parent1f2a37876b322b749c475cd2f82f236be8dc6a48 (diff)
downloadruby-62284f736a6280eb17168b4d561add2e708ff0a9.tar.gz
benchmark/*.yml: convert from benchmark/bm_*.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark/io_file_write.yml')
-rw-r--r--benchmark/io_file_write.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/benchmark/io_file_write.yml b/benchmark/io_file_write.yml
new file mode 100644
index 0000000000..68af6d588c
--- /dev/null
+++ b/benchmark/io_file_write.yml
@@ -0,0 +1,17 @@
+benchmark:
+ io_file_write: |
+ #
+ # Seek and Write file.
+ #
+
+ require 'tempfile'
+
+ max = 200_000
+ str = "Hello world! " * 1000
+ f = Tempfile.new('yarv-benchmark')
+
+ max.times{
+ f.seek 0
+ f.write str
+ }
+loop_count: 1