<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,11 +1,5 @@
 # This Rakefile is included so you can run RBS Benchmarks
-#
-# rake bench          # Run all the RBS benchmarks
-# rake bench:dir      # Run all the RBS benchmarks in DIR
-#      ex: rake bench:dir DIR=rbs/macro-benchmarks
-# rake bench:file     # Run only the RBS benchmark specified by FILE
-# rake bench:results  # Plot the RBS benchmark results (not implemented)
-# rake bench:to_csv   # Generate a CSV file of RBS results
+# See the readme for examples
 #
 # NOTE: rakelib/bench.rake requires this directory to be named: benchmark
 #       you may want to modify bench.rake to suit your own defaults.</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -26,7 +26,7 @@ end
 # Cache the name so it is only generated once during an invocation.
 # Eliminates having to save the name and pass it around.
 def report
-  # os = `uname`.chomp
+  # os = `uname`.chomp # doesn't work on doze
   # host = `uname -n`.chomp
   vm = File.basename VM.split.first
   # @report ||= &quot;#{RBS_RESULTS_DIR}/RBS-#{vm}-#{os}-#{host}-#{Time.now.strftime &quot;%y%m%d.%H%M%S&quot;}.yaml&quot;
@@ -119,6 +119,23 @@ namespace :bench do
     puts &quot;Done&quot;
   end
 
+  desc &quot;Run all the RBS benchmarks that match PATTERN ex: PATTERN=rbs/micro-benchmarks/bm_gc*&quot;
+  task :pattern =&gt; :setup do
+    dir = ENV['PATTERN'] || raise(&quot;bench:pattern needs PATTERN set&quot;)
+
+    puts &quot;Running all benchmarks matching #{dir}&quot;
+    puts &quot;  Writing report to #{report_name}&quot;
+
+    Dir[dir].sort.each do |name|
+      Dir.chdir File.dirname(name) do
+        puts &quot;  Running #{File.basename name}&quot;
+        system &quot;#{command name}&quot;
+      end
+    end
+
+    puts &quot;Done&quot;
+  end
+
   desc &quot;Run all the RBS benchmarks in DIR&quot;
   task :dir =&gt; :setup do
     dir = ENV['DIR'] || raise(&quot;bench:dir needs DIR to be a directory&quot;)</diff>
      <filename>rakelib/bench.rake</filename>
    </modified>
    <modified>
      <diff>@@ -8,9 +8,9 @@
 #     # do something interesting
 #   end
 #
-#   Bench.run { quirks 100 }
+#   Bench.run [100] { |n| quirks n }
 #
-# Bench.run will time the running of the block for the requested
+# Bench.run will run the blocktime the running of the block for the requested
 # number of iterations and then compute some statistics and append
 # a YAML-formatted report to the specified file.
 
@@ -80,6 +80,16 @@ class Bench
       inputs.each do |input|
         f.puts &quot;- #{input}&quot;
       end
+
+      begin
+        version_string = &quot;&quot;
+        version_string = &quot;#{RUBY_VERSION} #{RUBY_RELEASE_DATE} #{RUBY_PATCHLEVEL} #{RUBY_PLATFORM}&quot;
+        require 'rbconfig'
+        version_string += ';' + Config::CONFIG['CFLAGS'] + ';' + Config::CONFIG[&quot;configure_args&quot;] 
+      rescue Exception
+      end
+
+      f.puts &quot;ruby_ver: &quot; + version_string
     end
   end
 </diff>
      <filename>utils/bench.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,14 +4,16 @@
 
 timeout = File.dirname(__FILE__) + &quot;/timeout&quot;
 
+null = &quot;/dev/null&quot;
 if RUBY_PLATFORM =~ /mingw|mswin/
   timeout = &quot;ruby &quot; + File.dirname(__FILE__) + &quot;/timeout2.rb&quot;
+  null = &quot;NUL&quot;
 end
 
 limit, vm, runner, name, iterations, report = ARGV
 
 start = Time.now
-cmd = &quot;#{timeout} -t #{limit} #{vm} #{runner} #{name} #{iterations} #{report} &gt; /dev/null&quot;
+cmd = &quot;#{timeout} -t #{limit} #{vm} #{runner} #{name} #{iterations} #{report} &gt; #{null}&quot;
 system cmd
 finish = Time.now
 </diff>
      <filename>utils/monitor.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>rbs/micro-benchmarks/bm_gc_cow.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>db3549b91a409ca4096c631d40361251e90ce8bb</id>
    </parent>
    <parent>
      <id>2d8d0f243e5a36068672fdac08925f9ee0a4748e</id>
    </parent>
  </parents>
  <author>
    <name>Roger Pack</name>
    <email>rogerpack2005@gmail.com</email>
  </author>
  <url>http://github.com/acangiano/ruby-benchmark-suite/commit/37543a8419123eb28ef083d2333491731f499466</url>
  <id>37543a8419123eb28ef083d2333491731f499466</id>
  <committed-date>2009-06-13T16:45:55-07:00</committed-date>
  <authored-date>2009-06-13T16:45:55-07:00</authored-date>
  <message>overcome merge difficulty</message>
  <tree>8406283fd66ddcb3f7a3d77686693e61983a62f3</tree>
  <committer>
    <name>Roger Pack</name>
    <email>rogerpack2005@gmail.com</email>
  </committer>
</commit>
