summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-06-10 21:13:12 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-06-10 21:13:14 +0900
commit973fd18f11f5026024fc43e2848db030110bdaee (patch)
tree97295c7a9b43a606f2d83f9624ea957997f5666f /benchmark
parentb9996b7b323d7e238512fa8dbd3d3b8576ba06e1 (diff)
Add a benchmark of irb boot time
``` $ benchmark-driver benchmark/irb_exec.yml --rbenv '2.6.3;2.7.0-preview1' Calculating ------------------------------------- 2.6.3 2.7.0-preview1 irb_exec 11.844 5.171 i/s - 30.000 times in 2.532887s 5.801960s Comparison: irb_exec 2.6.3: 11.8 i/s 2.7.0-preview1: 5.2 i/s - 2.29x slower ```
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/irb_exec.yml10
1 files changed, 10 insertions, 0 deletions
diff --git a/benchmark/irb_exec.yml b/benchmark/irb_exec.yml
new file mode 100644
index 0000000000..5575c00537
--- /dev/null
+++ b/benchmark/irb_exec.yml
@@ -0,0 +1,10 @@
+prelude: |
+ # frozen_string_literal: true
+ require 'rbconfig'
+ irb = File.join(File.dirname(RbConfig.ruby), 'irb')
+benchmark:
+ irb_exec: |
+ IO.popen(irb, 'w') do |io|
+ io.write('exit')
+ end
+loop_count: 30