HTTPD::Bench::ApacheBench

HTTPD::Bench::ApacheBench is a Perl API for Apache benchmarking and regression testing.
Download

HTTPD::Bench::ApacheBench Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Adi Fairbank
  • Publisher web site:
  • http://search.cpan.org/~adiraj/Apache-App-Mercury-0.80/Mercury/UserManager.pm

HTTPD::Bench::ApacheBench Tags


HTTPD::Bench::ApacheBench Description

HTTPD::Bench::ApacheBench is a Perl API for Apache benchmarking and regression testing. HTTPD::Bench::ApacheBench is a Perl API for Apache benchmarking and regression testing.SYNOPSIS use HTTPD::Bench::ApacheBench; my $b = HTTPD::Bench::ApacheBench->new; # global configuration $b->concurrency(5); $b->priority("run_priority"); # add HTTP request sequences (aka: runs) my $run1 = HTTPD::Bench::ApacheBench::Run->new ({ urls => }); $b->add_run($run1); my $run2 = HTTPD::Bench::ApacheBench::Run->new ({ urls => , cookies => , order => "depth_first", repeat => 10, memory => 2 }); $b->add_run($run2); # send HTTP request sequences to server and time responses my $ro = $b->execute; # calculate hits/sec print ((1000*$b->total_requests/$b->total_time)." req/secn"); # show request times (in ms) for $run1, 1st repetition print join(', ', @{$run1->request_times}) . "n"; # show response times (in ms) for $run2, 7th repetition print join(', ', @{$run2->iteration(6)->response_times}) . "n"; # dump the entire regression object (WARNING, this could be a LOT OF DATA) use Data::Dumper; my $d = Data::Dumper->new(); print $d->Dumpxs;GOALSThis 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 is based on the Apache 1.3.12 ab code (src/support/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 of time, which may overwhelm some weaker HTTP server implementations like NT/IIS.ApacheBench sends sequences of HTTP requests to an HTTP server and keeps track of the time taken to receive a response, the data that was returned, the size of the data that was returned, and various other bits of information.Since it is implemented in C, it sends HTTP requests in a tight loop which can stress your server to 100% capacity, especially if invoked in multiple concurrent instances. It gives accurate time measurements down to the millisecond for each HTTP request-response interval.Included is a simplified re-implementation of ab using the ApacheBench Perl API. This should help get you started with ApacheBench. Requirements: · Perl


HTTPD::Bench::ApacheBench Related Software