summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-20 06:18:09 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-20 06:18:09 +0000
commit99b10ff471c50358ed0f6864f4cf87857c51a91d (patch)
treee8c951ec1afa18da031e3b140db30823163a61cb /tool
parentab7e4592106e0796d5b243c0d0c8629a47351e05 (diff)
* benchmark/gc: create a directory to store GC related benchmark.
* benchmark/gc/gcbench.rb: moved from tool/gcbench.rb. * benchmark/gc/hash(1|2).rb: ditto. * benchmark/gc/rdoc.rb: ditto. * benchmark/gc/null.rb: added. * common.mk: fix rule. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r--tool/gcbench.rb22
-rw-r--r--tool/hashbench1.rb11
-rw-r--r--tool/hashbench2.rb7
-rw-r--r--tool/rdocbench.rb11
4 files changed, 0 insertions, 51 deletions
diff --git a/tool/gcbench.rb b/tool/gcbench.rb
deleted file mode 100644
index ca9f3cd950..0000000000
--- a/tool/gcbench.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-
-require 'benchmark'
-require 'pp'
-
-script = ARGV.shift || raise
-
-GC::Profiler.enable
-tms = Benchmark.measure{|x|
- load script
-}
-GC::Profiler.report
-pp GC.stat
-
-gc_time = GC::Profiler.total_time
-
-puts
-puts Benchmark::CAPTION
-puts tms
-puts "GC total time (sec): #{gc_time}"
-puts
-puts "Summary #{RUBY_DESCRIPTION}\t#{tms.real}\t#{gc_time}\t#{GC.count}"
-puts " (real time in sec, GC time in sec, GC count)"
diff --git a/tool/hashbench1.rb b/tool/hashbench1.rb
deleted file mode 100644
index cb030d458d..0000000000
--- a/tool/hashbench1.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-value = 0.01
-h = {}
-n = 50_000
-
-1.upto(n){|i|
- h["%020d" % i] = "v-#{i}"
-}
-
-(n * 1_000).times{
- ''
-}
diff --git a/tool/hashbench2.rb b/tool/hashbench2.rb
deleted file mode 100644
index e8c943fb21..0000000000
--- a/tool/hashbench2.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-value = 0.01
-h = {}
-n = 4*(10**6)
-
-1.upto(n){|i|
- h["%020d" % i] = value * i
-}
diff --git a/tool/rdocbench.rb b/tool/rdocbench.rb
deleted file mode 100644
index a248b9a9b7..0000000000
--- a/tool/rdocbench.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require 'rdoc/rdoc'
-require 'tmpdir'
-
-Dir.mktmpdir('rdocbench-'){|d|
- dir = File.join(d, 'rdocbench')
- args = ARGV.dup
- args << '--op' << dir
-
- r = RDoc::RDoc.new
- r.document args
-}