Skip to content

Instantly share code, notes, and snippets.

@lak
Created July 5, 2009 23:46
Show Gist options
  • Select an option

  • Save lak/141185 to your computer and use it in GitHub Desktop.

Select an option

Save lak/141185 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment