Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding the help

  • Loading branch information...
commit 007ec816331f5c9fc4e0f1d6adb71d7110a6e7a0 1 parent bbc04aa
@shafiev authored
Showing with 24 additions and 1 deletion.
  1. +24 −1 benchmark.pl
View
25 benchmark.pl
@@ -10,7 +10,7 @@
my $count = 30000; #number of requests
my $concurency = 20; # number of parralle requests
my $done = 0;
-my $url; # default url to test
+my $url;
my $method = 'GET'; #http method
my $proxy; # proxy server
my $file; #scenario file
@@ -47,6 +47,28 @@
#subs
sub parse_command_line {
+ if (not defined @ARGV)
+ {
+ print <<HEREDOC;
+
+ url => \$url,
+ number count,
+ c => \$concurency,
+ "verbose!" => \$verbose,
+ "debug" => \$DEBUG,
+ "proxy=s" => \$proxy,
+ "useragent=s" => \$useragent
+
+Example :
+ ./benchmark.pl -url=http://myfavouritesite.com -n=number_of_requests -c=number_of_parrallel clients
+ -
+ Another example :
+ ./benchmark.pl --url=http://example.com -n=100 -c=10 -v
+
+
+HEREDOC
+
+ }
#get options which ovveride the default values
my $result = GetOptions(
@@ -64,6 +86,7 @@ sub parse_command_line {
$url = shift @ARGV;
}
else {
+ #set the default site elementa.su
$url = 'http://elementa.su/';
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.