#!/bin/csh
jdk-go

set profile = 0
#set target = /tmp/valleynet
#set target = /tmp/brief
set target = /tmp/complete

# profile generator
if ($profile) then
	java -prof relational.email.Mailbox $target
	mv java.prof prof-local
	java -prof relational.RMIDatabase &
	sleep 3
	(cd /tmp; java -prof relational.email.Mailbox $target remote)
	mv /tmp/java.prof prof-client
	mv java.prof prof-server
	foreach i (prof-{client,server,local})
		sort -r +3 -n < $i > $i.sort
	end
endif

# just time it
java relational.email.Mailbox $target
java relational.RMIDatabase &
	sleep 3
java relational.email.Mailbox $target remote
