Skip to content

Commit

Permalink
-adding the missing benchmark.pl
Browse files Browse the repository at this point in the history
-rechange the verboser flag to -verbose
-delete some obsolete things
  • Loading branch information
shafiev committed Jun 20, 2010
1 parent 29e9e13 commit e7f2d25
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 15 deletions.
7 changes: 6 additions & 1 deletion Changes
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion MANIFEST
Expand Up @@ -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 changes: 6 additions & 5 deletions benchmark.pl
@@ -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)
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -111,7 +112,7 @@ sub add_request {
$done++;

if ($verbose >= 2) {
print "=========== HTTP RESPONCE ===========\n";
print "=========== HTTP RESPONSE ===========\n";
print @_[0];
}

Expand Down
20 changes: 12 additions & 8 deletions lib/AnyEvent/HTTPBenchmark.pm
Expand Up @@ -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
Expand All @@ -33,7 +35,8 @@ Currently no export functions are implemented.
=cut

sub function1 {
sub make_request {
#not implemented
}

=head2 function2
Expand All @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit e7f2d25

Please sign in to comment.