massDataGen.rb #1

  • //
  • guest/
  • matt_attaway/
  • treemap/
  • main/
  • massDataGen.rb
  • View
  • Commits
  • Open Download .zip Download (1 KB)
#!/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
# Change User Description Committed
#1 16613 Matt Attaway Initial add of an dataviz experiment I did with treemaps in Helix