ApacheBench
view release on metacpan or search on metacpan
clean up XS code some more, renaming variables to be more sensible
get rid of Term::ReadKey based test requiring user input from t/test3_execute.t,
to stop annoying e-mail from cpantesters
modified behavior of request_body() and response_body() regression methods to
return only the actual body content, instead of the entire headers and body;
headers can still be retrieved from request_headers() and response_headers()
better configuration error checking- verify Run->urls is a list of scalars with
no trailing whitespace before executing, since xs code will segfault if not scalars
and not process the requests correctly if trailing whitespace
=item 0.63 - Oct 07, 2004
bugfix hanging/infinitely repeating requests when HTTP response headers larger
than 512 bytes: increased limit to 4096 bytes
(thanks to John Fricker <jfricker@musiciansfriend.com> for patch)
added 'get_headers' utility script that reads just the HTTP response headers
This is ApacheBench/Perl, a Perl API for Apache benchmarking
and regression testing.
This project is meant to be the foundation of a complete
benchmarking and regression testing suite for a transaction-
processing mod_perl site. We needed to be able to stress our
server to its limit while also having a way to verify the
HTTP responses for correctness. We also extended the
single-URL ab model to a multiple-URL sequence model.
ApacheBench was originally based on the Apache 1.3.12 ab code
(src/support/ab.c). Since the initial release, I have made
efforts to merge in all the newest features of ab.
As of version 0.62 it has almost all the features of
Apache 1.3.22 ab. However, since the code has so much
more/different functionality than "ab" at this point, it's
almost pointless to continue merging code. It's an entirely
lib/HTTPD/Bench/ApacheBench.pm view on Meta::CPAN
foreach my $run (@{$self->{runs}}) {
my $repeat = $run->repeat ? $run->repeat : $self->{repeat};
$total += ($#{$run->urls} + 1) * $repeat
if ref $run->urls eq 'ARRAY';
}
return $total;
}
##################################################
## verify configuration of runs and execute ##
##################################################
sub execute {
my ($self) = @_;
# keep track of temporarily altered run object variables
my %altered;
# fail if they have not added any runs
return undef if ref $self->{runs} ne 'ARRAY';
# pre execute initialization of each run
lib/HTTPD/Bench/ApacheBench.pm view on Meta::CPAN
use Data::Dumper;
my $d = Data::Dumper->new([$ro]);
print $d->Dumpxs;
=head1 GOALS
This project is meant to be the foundation of a complete benchmarking
and regression testing suite for an advanced, transaction-based mod_perl
site. We need to be able to stress our server to its limit while also
having a way to verify the HTTP responses for correctness. Since our site
is transaction-based (as opposed to content-based), we needed to extend
the single-URL ab model to a multiple-URL sequence model.
ApacheBench was originally based on the Apache 1.3.12 ab code
(src/support/ab.c), but has since undergone major rewrites and now barely
resembles ab.c.
Note: although this tool was designed to be used on an Apache mod_perl
site, it is generally applicable to any HTTP-compliant server. Beware,
however, that it sends a high volume of HTTP requests in a very short period
( run in 0.368 second using v1.01-cache-2.11-cpan-73692580452 )