class RailsBenchmarking BRANCHES = %w{rails/new rails/normal rails/new_no_accum} attr_accessor :type, :host def clear system("rm -rf #{path}") end def initialize @host = ARGV.shift @type = ARGV.shift end def path "/tmp/dbtest" end def run BRANCHES.each do |branch| run_branch(branch) end end def run_branch(branch) clear() system("git checkout #{branch}") exit unless $? == 0 execute() execute if @type == "partial" end def execute system("~/tmp/stanford/tmp/trans2db --confdir #{path} --vardir #{path} ~/tmp/stanford/tmp/#{host}.yaml") end end