first commit
This commit is contained in:
67
CS4210/cs4210/proj1/runclient.pl
Normal file
67
CS4210/cs4210/proj1/runclient.pl
Normal file
@@ -0,0 +1,67 @@
|
||||
|
||||
|
||||
my $client;
|
||||
my $thread_count;
|
||||
my $job_count;
|
||||
my $urlfile;
|
||||
my $server;
|
||||
my $pool_size;
|
||||
|
||||
&varyURLFile();
|
||||
|
||||
#&thousandFiles();
|
||||
|
||||
sub thousandFiles() {
|
||||
|
||||
&initClient();
|
||||
my $string = "$client job-count=3000 thread-count=32 < urlfile6";
|
||||
system($string);
|
||||
}
|
||||
|
||||
sub initClient() {
|
||||
$client = "bin/client";
|
||||
$thread_count = 2;
|
||||
$job_count = $thread_count * 100;
|
||||
$urlfile = "urlfile";
|
||||
}
|
||||
|
||||
sub varyThreadCountClient() {
|
||||
my $file = pop(@_);
|
||||
my $i;
|
||||
my $string = "echo 'Something bad happened if you see this.";
|
||||
|
||||
&initClient();
|
||||
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
$thread_count = $thread_count * 2;
|
||||
$job_count = $thread_count * 10;
|
||||
$string = "$client job-count=$job_count thread-count=$thread_count < $file";
|
||||
|
||||
system($string);
|
||||
print "-----------------------------------------------------------------\n";
|
||||
}
|
||||
system("$client job-count=1280 thread-count=128 < $file");
|
||||
print "-----------------------------------------------------------------\n";
|
||||
}
|
||||
|
||||
sub varyURLFile() {
|
||||
my $j = 0;
|
||||
|
||||
&initClient();
|
||||
for ($j = 1; $j < 6; $j++) {
|
||||
&varyThreadCountClient("$urlfile$j");
|
||||
}
|
||||
}
|
||||
|
||||
sub initServer() {
|
||||
$server = "bin/server";
|
||||
$pool_size = 2;
|
||||
}
|
||||
|
||||
sub varyThreadCountServer() {
|
||||
&initServer();
|
||||
|
||||
$thread_count = $thread_count * 2;
|
||||
$job_count = $thread_count * 100;
|
||||
open(SERVER, "| $server home=home pool-size=$pool_size") or die "Could not open server! $!";
|
||||
}
|
||||
Reference in New Issue
Block a user