Created
July 5, 2009 23:46
-
-
Save lak/141185 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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