#include "apr.h"#include "apr_signal.h"#include "apr_strings.h"#include "apr_network_io.h"#include "apr_file_io.h"#include "apr_time.h"#include "apr_getopt.h"#include "apr_general.h"#include "apr_lib.h"#include "apr_portable.h"#include "ap_release.h"#include "apr_poll.h"#include "apr_want.h"#include "apr_base64.h"#include "apr_xlate.h"Include dependency graph for ab.c:

Go to the source code of this file.
Defines | |
| #define | AP_AB_BASEREVISION "2.0.41-dev" |
| #define | NOT_ASCII |
| #define | BSD_COMP |
| #define | APR_WANT_STRFUNC |
| #define | AB_MAX APR_INT64_C(0x7fffffffffffffff) |
| #define | MAX_REQUESTS 50000 |
| #define | STATE_UNCONNECTED 0 |
| #define | STATE_CONNECTING 1 |
| #define | STATE_CONNECTED 2 |
| #define | STATE_READ 3 |
| #define | CBUFFSIZE (2048) |
| #define | ap_min(a, b) ((a)<(b))?(a):(b) |
| #define | ap_max(a, b) ((a)>(b))?(a):(b) |
| #define | MAX_CONCURRENCY 20000 |
| #define | CONF_FMT_STRING "%5" APR_TIME_T_FMT " %4d %5.1f %6" APR_TIME_T_FMT " %7" APR_TIME_T_FMT "\n" |
| #define | SANE(what, mean, median, sd) |
| #define | CONF_FMT_STRING "%5" APR_TIME_T_FMT " %5" APR_TIME_T_FMT "%5" APR_TIME_T_FMT "\n" |
Functions | |
| static void | close_connection (struct connection *c) |
| static void | err (char *s) |
| static void | apr_err (char *s, apr_status_t rv) |
| static void | write_request (struct connection *c) |
| static int | compradre (struct data *a, struct data *b) |
| static int | comprando (struct data *a, struct data *b) |
| static int | compri (struct data *a, struct data *b) |
| static int | compwait (struct data *a, struct data *b) |
| static void | output_results (void) |
| static void | output_html_results (void) |
| static void | start_connect (struct connection *c) |
| static void | read_connection (struct connection *c) |
| static void | test (void) |
| static void | copyright (void) |
| static void | usage (const char *progname) |
| static int | parse_url (char *url) |
| static int | open_postfile (const char *pfile) |
| int | main (int argc, const char *const argv[]) |
Variables | |
| int | verbosity = 0 |
| int | posting = 0 |
| int | requests = 1 |
| int | heartbeatres = 100 |
| int | concurrency = 1 |
| int | percentile = 1 |
| int | confidence = 1 |
| int | tlimit = 0 |
| int | keepalive = 0 |
| char | servername [1024] |
| char * | hostname |
| char * | host_field |
| char * | path |
| char | postfile [1024] |
| char * | postdata |
| apr_size_t | postlen = 0 |
| char | content_type [1024] |
| char * | cookie |
| char * | auth |
| char * | hdrs |
| apr_port_t | port |
| char | proxyhost [1024] |
| int | proxyport = 0 |
| char * | connecthost |
| apr_port_t | connectport |
| char * | gnuplot |
| char * | csvperc |
| char | url [1024] |
| char * | fullurl |
| char * | colonhost |
| int | isproxy = 0 |
| apr_interval_time_t | aprtimeout = apr_time_from_sec(30) |
| int | use_html = 0 |
| const char * | tablestring |
| const char * | trstring |
| const char * | tdstring |
| apr_size_t | doclen = 0 |
| long | started = 0 |
| long | totalread = 0 |
| long | totalbread = 0 |
| long | totalposted = 0 |
| long | done = 0 |
| long | doneka = 0 |
| long | good = 0 |
| long | bad = 0 |
| long | epipe = 0 |
| int | err_length = 0 |
| int | err_conn = 0 |
| int | err_except = 0 |
| int | err_response = 0 |
| apr_time_t | start |
| apr_time_t | endtime |
| char | _request [512] |
| char * | request = _request |
| apr_size_t | reqlen |
| char | buffer [8192] |
| int | percs [] = {50, 66, 75, 80, 90, 95, 98, 99, 100} |
| connection * | con |
| data * | stats |
| apr_pool_t * | cntxt |
| apr_pollset_t * | readbits |
| apr_sockaddr_t * | destsa |
| apr_xlate_t * | from_ascii |
| apr_xlate_t * | to_ascii |
|
|
Definition at line 178 of file ab.c. Referenced by output_html_results(), and output_results(). |
|
|
Definition at line 94 of file ab.c. Referenced by copyright(), and test(). |
|
|
Definition at line 236 of file ab.c. Referenced by output_html_results(), and output_results(). |
|
|
Definition at line 235 of file ab.c. Referenced by output_html_results(), and output_results(). |
|
|
|
|
|
|
|
|
Definition at line 194 of file ab.c. Referenced by read_connection(). |
|
|
|
|
|
Referenced by output_results(). |
|
|
Definition at line 237 of file ab.c. Referenced by main(). |
|
|
Definition at line 184 of file ab.c. Referenced by main(). |
|
|
|
|
|
Value: { \
double d = (double)mean - median; \
if (d < 0) d = -d; \
if (d > 2 * sd ) \
printf("ERROR: The median and mean for " what " are more than twice the standard\n" \
" deviation apart. These results are NOT reliable.\n"); \
else if (d > sd ) \
printf("WARNING: The median and mean for " what " are not within a normal deviation\n" \
" These results are probably not that reliable.\n"); \
}
Referenced by output_results(). |
|
|
Definition at line 191 of file ab.c. Referenced by start_connect(), and test(). |
|
|
Definition at line 188 of file ab.c. Referenced by start_connect(), and test(). |
|
|
Definition at line 192 of file ab.c. Referenced by test(), and write_request(). |
|
|
Definition at line 187 of file ab.c. Referenced by close_connection(), start_connect(), and test(). |
|
||||||||||||
|
Definition at line 342 of file ab.c. References buf, done, and exit. Referenced by APR_DECLARE(), apr_dir_make_recursive(), read_connection(), start_connect(), and test(). |
|
|
Definition at line 1256 of file ab.c. References APR_POLL_SOCKET, apr_socket_close(), connection::aprsock, bad, connection::beginread, connection::bread, connection::connect, data::ctime, apr_pollfd_t::desc, apr_pollfd_t::desc_type, doclen, connection::done, done, connection::endwrite, err_length, connection::fd, FD_CLR, good, heartbeatres, connection::keepalive, data::read, connection::read, requests, apr_descriptor::s, connection::start, start_connect(), data::starttime, connection::state, STATE_UNCONNECTED, data::time, timedif(), and data::waittime. Referenced by read_connection(), and write_request(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 771 of file ab.c. References data::ctime. Referenced by output_results(). |
|
||||||||||||
|
Definition at line 780 of file ab.c. References data::time. Referenced by output_results(). |
|
||||||||||||
|
Definition at line 789 of file ab.c. References data::ctime, and data::time. Referenced by output_results(). |
|
||||||||||||
|
Definition at line 800 of file ab.c. References data::waittime. Referenced by output_results(). |
|
|
Definition at line 1773 of file ab.c. References AP_AB_BASEREVISION, and use_html. Referenced by main(). |
|
|
|
|
||||||||||||
|
Definition at line 1950 of file ab.c. References APR_DEFAULT_CHARSET, apr_isspace, apr_pool_create, apr_signal, APR_SUCCESS, apr_getopt_t::argv, auth, concurrency, confidence, cookie, copyright(), csvperc, ctx, err, exit, from_ascii, gnuplot, hdrs, heartbeatres, apr_getopt_t::ind, isproxy, keepalive, MAX_CONCURRENCY, MAX_REQUESTS, NULL, open_postfile(), opt, parse_url(), percentile, postdata, posting, proxyhost, proxyport, r, requests, ssl_util_thread_setup(), status, strdup(), tablestring, tdstring, test(), tlimit, to_ascii, trstring, usage, use_html, and verbosity. Here is the call graph for this function: ![]() |
|
|
Definition at line 1907 of file ab.c. References APR_EINVAL, APR_ENOMEM, APR_FINFO_NORM, APR_OS_DEFAULT, APR_READ, APR_SUCCESS, errmsg(), length, NULL, postdata, postlen, and apr_finfo_t::size. Referenced by main(). Here is the call graph for this function: ![]() |
|
|
Definition at line 1060 of file ab.c. References AB_MAX, ap_max, ap_min, apr_time_sec, APR_TIME_T_FMT, apr_time_usec, bad, concurrency, data::ctime, doclen, done, doneka, endtime, err_conn, err_except, err_length, err_response, hostname, keepalive, path, port, posting, requests, servername, start, tablestring, tdstring, data::time, totalbread, totalposted, totalread, and trstring. Referenced by test(). |
|
|
Definition at line 809 of file ab.c. References AB_MAX, ap_max, ap_min, apr_ctime(), apr_time_sec, APR_TIME_T_FMT, apr_time_usec, bad, compradre(), comprando(), compri(), compwait(), concurrency, CONF_FMT_STRING, confidence, csvperc, data::ctime, doclen, done, doneka, endtime, epipe, err_conn, err_except, err_length, err_response, exit, gnuplot, hostname, keepalive, path, percentile, percs, port, posting, requests, SANE, servername, start, data::starttime, data::time, totalbread, totalposted, totalread, void(), and data::waittime. Referenced by test(). Here is the call graph for this function: ![]() |
|
|
Definition at line 1835 of file ab.c. References APR_SUCCESS, colonhost, exit, fullurl, host_field, hostname, NULL, path, port, and scope_id. Referenced by main(). |
|
|
Definition at line 1316 of file ab.c. References apr_err(), APR_POLL_SOCKET, apr_recv(), apr_socket_close(), APR_STATUS_IS_EAGAIN, APR_STATUS_IS_EOF, APR_SUCCESS, connection::aprsock, bad, connection::beginread, connection::bread, buffer, connection::cbuff, CBUFFSIZE, connection::cbx, close_connection(), connection::connect, data::ctime, apr_pollfd_t::desc, apr_pollfd_t::desc_type, doclen, connection::done, done, doneka, connection::endwrite, err, err_except, err_length, err_response, exit, from_ascii, good, connection::gotheader, heartbeatres, inbytes_left, connection::keepalive, keepalive, connection::length, outbytes_left, r, data::read, connection::read, requests, apr_descriptor::s, s, servername, connection::start, start_connect(), data::starttime, status, strstr(), data::time, totalbread, totalread, verbosity, data::waittime, and write_request(). Referenced by test(). Here is the call graph for this function: ![]() |
|
|
Definition at line 1183 of file ab.c. References apr_connect(), apr_err(), APR_POLL_SOCKET, APR_POLLOUT, apr_pool_create, APR_SO_NONBLOCK, apr_socket_close(), apr_socket_create(), apr_socket_opt_set(), APR_STATUS_IS_EINPROGRESS, APR_SUCCESS, connection::aprsock, bad, connection::bread, connection::cbx, apr_pollfd_t::client_data, connection::ctx, apr_pollfd_t::desc, apr_pollfd_t::desc_type, err_conn, apr_sockaddr_t::family, connection::gotheader, connection::keepalive, connection::read, apr_pollfd_t::reqevents, requests, connection::rwrite, apr_descriptor::s, connection::start, started, connection::state, STATE_CONNECTED, STATE_CONNECTING, STATE_UNCONNECTED, and write_request(). Referenced by close_connection(), read_connection(), start_connect(), and test(). Here is the call graph for this function: ![]() |
|
|
|
Definition at line 1791 of file ab.c. References exit. |
|
|
Definition at line 684 of file ab.c. References APR_POLL_SOCKET, APR_POLLIN, apr_send(), apr_socket_timeout_set(), APR_STATUS_IS_EAGAIN, APR_SUCCESS, connection::aprsock, aprtimeout, apr_pollfd_t::client_data, close_connection(), connection::connect, apr_pollfd_t::desc, apr_pollfd_t::desc_type, e, connection::endwrite, epipe, posting, postlen, apr_pollfd_t::reqevents, reqlen, request, connection::rwrite, connection::rwrote, apr_descriptor::s, connection::state, STATE_READ, and totalposted. Referenced by read_connection(), start_connect(), and test(). Here is the call graph for this function: ![]() |
|
|
|
|
|
Definition at line 271 of file ab.c. Referenced by test(), and write_request(). |
|
|
Definition at line 258 of file ab.c. Referenced by APR_OPTIONAL_FN_TYPE(), dav_method_copymove(), main(), modssl_ctx_cfg_merge(), and test(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 269 of file ab.c. Referenced by parse_url(), and test(). |
|
|
|
|
|
Definition at line 245 of file ab.c. Referenced by main(), output_html_results(), output_results(), and test(). |
|
|
Definition at line 247 of file ab.c. Referenced by main(), and output_results(). |
|
|
Definition at line 264 of file ab.c. Referenced by test(). |
|
|
Definition at line 265 of file ab.c. Referenced by ap_proxy_connect_handler(), ap_proxy_ftp_handler(), and test(). |
|
|
|
|
|
Definition at line 258 of file ab.c. Referenced by add_cookie(), log_cookie(), main(), and test(). |
|
|
Definition at line 267 of file ab.c. Referenced by main(), and output_results(). |
|
|
Definition at line 321 of file ab.c. Referenced by rfc1413_connect(). |
|
|
Definition at line 281 of file ab.c. Referenced by close_connection(), output_html_results(), output_results(), and read_connection(). |
|
|
Definition at line 286 of file ab.c. Referenced by apr_err(), close_connection(), deflate_out_filter(), err(), getsfunc_BRIGADE(), main(), output_html_results(), output_results(), parse_expr(), read_connection(), test(), and xlate_out_filter(). |
|
|
Definition at line 287 of file ab.c. Referenced by output_html_results(), output_results(), and read_connection(). |
|
|
Definition at line 302 of file ab.c. Referenced by output_html_results(), and output_results(). |
|
|
Definition at line 289 of file ab.c. Referenced by output_results(), and write_request(). |
|
|
Definition at line 299 of file ab.c. Referenced by output_html_results(), output_results(), start_connect(), and test(). |
|
|
Definition at line 299 of file ab.c. Referenced by output_html_results(), output_results(), read_connection(), and test(). |
|
|
Definition at line 299 of file ab.c. Referenced by close_connection(), output_html_results(), output_results(), and read_connection(). |
|
|
Definition at line 300 of file ab.c. Referenced by output_html_results(), output_results(), and read_connection(). |
|
|
Definition at line 324 of file ab.c. Referenced by main(), and read_connection(). |
|
|
Definition at line 269 of file ab.c. Referenced by parse_url(), and test(). |
|
|
Definition at line 266 of file ab.c. Referenced by main(), and output_results(). |
|
|
Definition at line 288 of file ab.c. Referenced by check_speling(), close_connection(), and read_connection(). |
|
|
Definition at line 258 of file ab.c. Referenced by AP_DECLARE(), emit_head(), log_script(), lookup_header(), main(), parse_accept_headers(), set_neg_headers(), and test(). |
|
|
Definition at line 244 of file ab.c. Referenced by close_connection(), main(), read_connection(), and test(). |
|
|
Definition at line 252 of file ab.c. Referenced by parse_url(), and test(). |
|
|
|
|
|
|
|
|
Definition at line 249 of file ab.c. Referenced by main(), output_html_results(), output_results(), read_connection(), and test(). |
|
|
|
|
|
Definition at line 246 of file ab.c. Referenced by main(), and output_results(). |
|
|