summaryrefslogtreecommitdiff
path: root/benchmark/prepare_require.rb
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/prepare_require.rb')
-rw-r--r--benchmark/prepare_require.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/benchmark/prepare_require.rb b/benchmark/prepare_require.rb
new file mode 100644
index 0000000..40926df
--- /dev/null
+++ b/benchmark/prepare_require.rb
@@ -0,0 +1,14 @@
+require "fileutils"
+
+basename = File.dirname($0)
+data_dir = File.join(basename, "bm_require.data")
+
+FileUtils.mkdir_p(data_dir)
+
+1.upto(10000) do |i|
+ f = File.open("#{data_dir}/c#{i}.rb", "w")
+ f.puts <<-END
+ class C#{i}
+ end
+ END
+end