Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

-adding the missing benchmark.pl

-rechange the verboser flag to -verbose
-delete some obsolete things
  • Loading branch information...
commit e7f2d254fbe2534aaaff50f2e614396da03c8161 1 parent 29e9e13
Naim authored
7 Changes
View
@@ -1,10 +1,15 @@
+0.07
+ -adding the missing benchmark.pl
+ -rechange the verboser flag to -verbose
+ -delete some obsolete things
+0.06
+ -more help
0.05
-adding help
-try to curve dns caching problem :)
0.04
-remove the -file param releted code.
-change the all say to perl due the perl 5.8.x(really because this version is using be RHEL/CentOS )
- -
0.03
-adding the command line args. ( -url , -c , -n , -debug , -file, -proxy , useragent )
0.02
3  MANIFEST
View
@@ -2,8 +2,9 @@ Changes
MANIFEST
Makefile.PL
README
+benchmark.pl
lib/AnyEvent/HTTPBenchmark.pm
t/00-load.t
t/manifest.t
t/pod-coverage.t
-t/pod.t
+t/pod.t
11 benchmark.pl
View
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
use common::sense; #new features in perl
use Getopt::Long; # to command line parsing
+use AnyEvent::HTTP; # use for http requests and etc. methods
use POSIX;
use Data::Dumper; # to debug data
my $DEBUG = 0; #Debug mode. Default is false (0)
@@ -13,10 +14,10 @@
my $method = 'GET'; #http method
my $proxy; # proxy server
my $max_recurse = 10; # the default recurse number;
-my $useragent = 'Mozilla/5.0 (compatible; U; AnyEvent::HTTPBenchmark/0.06; +http://github.com/shafiev/AnyEvent-HTTPBenchmark)';
+my $useragent = 'Mozilla/5.0 (compatible; U; AnyEvent::HTTPBenchmark/0.07; +http://github.com/shafiev/AnyEvent-HTTPBenchmark)';
#arrays
-my @reqs_time; # the times of requests
+my @reqs_time; # the time of requests
parse_command_line(); #parsing the command line arguments
@@ -63,7 +64,7 @@ sub parse_command_line {
./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
+ benchmark.pl --url http://example.com -n 100 -c 10 -verbose 3
HEREDOC
@@ -75,7 +76,7 @@ sub parse_command_line {
"url=s" => \$url,
"n=i" => \$count,
"c=i" => \$concurency,
- "verbose|v+" => \$verbose,
+ "verbose=i" => \$verbose,
"debug" => \$DEBUG,
"proxy=s" => \$proxy,
"useragent=s" => \$useragent
@@ -111,7 +112,7 @@ sub add_request {
$done++;
if ($verbose >= 2) {
- print "=========== HTTP RESPONCE ===========\n";
+ print "=========== HTTP RESPONSE ===========\n";
print @_[0];
}
20 lib/AnyEvent/HTTPBenchmark.pm
View
@@ -5,23 +5,25 @@ use strict;
=head1 NAME
-AnyEvent::HTTPBenchmark - The tool to make benchmark good and easy!
+AnyEvent::HTTPBenchmark - The tool to make http benchmarking good and easy!
=head1 VERSION
-Version 0.06
+Version 0.07
=cut
-our $VERSION = '0.06';
+our $VERSION = '0.07';
=head1 SYNOPSIS
+
The apache benchmark (ab) , siege, jmeter and etc, are sometimes awesome to make http-load testing. But if
you want make some non-traditional test they are not good decision.This module try to help you in this case.
-Currently implemented just test utility , not a library .
+Currently implemented just test utility , not a library .Be patient ;)
+
- benchmark.pl --url http://example.com -n 100 -c 10 -v
+ benchmark.pl --url http://example.com -n 100 -c 10 -verbose
=head1 EXPORT
@@ -33,7 +35,8 @@ Currently no export functions are implemented.
=cut
-sub function1 {
+sub make_request {
+ #not implemented
}
=head2 function2
@@ -55,8 +58,6 @@ the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=AnyEvent-H
automatically be notified of progress on your bug as I make changes.
-
-
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
@@ -66,6 +67,9 @@ You can find documentation for this module with the perldoc command.
You can also look for information at:
+L<http://github.com/shafiev/AnyEvent-HTTPBenchmark>
+
+
=over 4
=item * RT: CPAN's request tracker
Please sign in to comment.
Something went wrong with that request. Please try again.