#!/usr/bin/ruby # = Synopsis # # massDataGen: builds up the full suite of treemap data for a server # = Usage # # massDataGen [ -p port ] [ -u user ] # load File.join( File.dirname( $0 ), "treemapCoreData.rb" ) $:.unshift File.join( File.dirname( $0 ), "p4ruby", RUBY_PLATFORM ) require 'getoptlong' require 'rdoc/usage' begin # unreasonable defaults port = "play:5432" user = "matt" # get the command line options if any, overriding the defaults opts = GetoptLong.new( [ '--help', '-h', GetoptLong::NO_ARGUMENT ], [ '--user', '-u', GetoptLong::REQUIRED_ARGUMENT ], [ '--port', '-p', GetoptLong::REQUIRED_ARGUMENT ] ) opts.each do |opt, arg| case opt when '--help' RDoc::usage when '--user' user = arg when '--port' port = arg end end getAreaTypes().each do | a | getShadingTypes().each do | s | puts "Running: treemapDataGen.rb -p #{port} -u #{user} -a #{a} -s #{s} -d 4" `ruby treemapDataGen.rb -p #{port} -u #{user} -a #{a} -s #{s} -d 4` end end end