add http_load port
-- http_load runs multiple HTTP fetches in parallel, to test the throughput of a web server. However unlike most such test clients, it runs in a single process, so it doesn't bog down the client machine. It can be configured to do HTTPS fetches as well.
This commit is contained in:
parent
01d8340f19
commit
503541afd5
13
www/http_load/files/Makefile.bsd
Normal file
13
www/http_load/files/Makefile.bsd
Normal file
@ -0,0 +1,13 @@
|
||||
# $OpenBSD: Makefile.bsd,v 1.1.1.1 2001/08/06 00:35:05 brad Exp $
|
||||
|
||||
PROG = http_load
|
||||
SRCS = http_load.c timers.c
|
||||
|
||||
CPPFLAGS+= -DUSE_SSL
|
||||
LDADD += -lssl -lcrypto
|
||||
|
||||
BINDIR = ${PREFIX}/bin
|
||||
MANDIR = ${PREFIX}/man/cat
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
22
www/http_load/patches/patch-http_load_1
Normal file
22
www/http_load/patches/patch-http_load_1
Normal file
@ -0,0 +1,22 @@
|
||||
$OpenBSD: patch-http_load_1,v 1.1.1.1 2001/08/06 00:35:05 brad Exp $
|
||||
--- http_load.1.orig Fri Mar 30 22:42:13 2001
|
||||
+++ http_load.1 Sun Aug 5 18:45:02 2001
|
||||
@@ -8,6 +8,8 @@ http_load - multiprocessing http test cl
|
||||
.RB [ -proxy
|
||||
.IR host:port ]
|
||||
.RB [ -verbose ]
|
||||
+.RB [ -timeout
|
||||
+.IR seconds ]
|
||||
.RI (
|
||||
.BI -parallel
|
||||
.IR N
|
||||
@@ -46,6 +48,9 @@ to throttle its consumption of data to 3
|
||||
by modem users.
|
||||
.PP
|
||||
The -proxy flag lets you run http_load through a web proxy.
|
||||
+.PP
|
||||
+The -timeout flag specifies the amount of seconds to wait for request.
|
||||
+Default is a compile-time define. (Usually -- 60 seconds).
|
||||
.PP
|
||||
The -verbose flag tells
|
||||
.I http_load
|
37
www/http_load/patches/patch-http_load_c
Normal file
37
www/http_load/patches/patch-http_load_c
Normal file
@ -0,0 +1,37 @@
|
||||
$OpenBSD: patch-http_load_c,v 1.1.1.1 2001/08/06 00:35:05 brad Exp $
|
||||
--- http_load.c.orig Thu Apr 5 21:07:27 2001
|
||||
+++ http_load.c Sun Aug 5 18:45:02 2001
|
||||
@@ -137,6 +137,7 @@ static int max_connections, num_connecti
|
||||
|
||||
static char* argv0;
|
||||
static int do_checksum, do_throttle, do_verbose, do_jitter, do_proxy;
|
||||
+static int idle_secs = IDLE_SECS;
|
||||
static float throttle;
|
||||
static char* proxy_host;
|
||||
static int proxy_port;
|
||||
@@ -309,6 +310,16 @@ main( int argc, char** argv )
|
||||
*colon = '\0';
|
||||
}
|
||||
}
|
||||
+ else if ( strncmp( argv[argn], "-timeout", sizeof("-timeout") ) == 0 && argn + 1 < argc )
|
||||
+ {
|
||||
+ idle_secs = atoi( argv[++argn] );
|
||||
+ if ( idle_secs < 1 )
|
||||
+ {
|
||||
+ (void) fprintf(
|
||||
+ stderr, "%s: timeout seconds must be at least 1\n", argv0 );
|
||||
+ exit( 1 );
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
usage();
|
||||
++argn;
|
||||
@@ -456,6 +467,8 @@ usage( void )
|
||||
"usage: %s [-checksum] [-throttle] [-proxy host:port] [-verbose]\n", argv0 );
|
||||
(void) fprintf( stderr,
|
||||
" -parallel N | -rate N [-jitter]\n" );
|
||||
+ (void) fprintf( stderr,
|
||||
+ " -timeout N\n" );
|
||||
(void) fprintf( stderr,
|
||||
" -fetches N | -seconds N\n" );
|
||||
(void) fprintf( stderr,
|
@ -1,22 +1,8 @@
|
||||
http_load runs multiple http/https fetches in parallel, to test the
|
||||
throughput of a web server. However unlike most such test clients,
|
||||
it runs in a single process, so it doesn't bog down the client
|
||||
machine.
|
||||
http_load runs multiple HTTP fetches in parallel, to test the throughput
|
||||
of a web server.
|
||||
|
||||
You give it a file containing a list of URLs that may be fetched,
|
||||
a flag specifying how to start connections (either by rate or by
|
||||
number of simulated users), and a flag specifying when to quit
|
||||
(either after a given number of fetches or a given elapsed time).
|
||||
There are also optional flags for checksums, throttling, and progress
|
||||
reports.
|
||||
|
||||
Sample run:
|
||||
|
||||
% http_load -rate 2 -seconds 300 urls
|
||||
591 fetches, 8 max parallel, 5.33606e+06 bytes, in 300 seconds
|
||||
9028.87 mean bytes/connection
|
||||
1.97 fetches/sec, 17786.9 bytes/sec
|
||||
236.082 mean msecs/connect
|
||||
256.73 mean msecs/first-response
|
||||
However unlike most such test clients, it runs in a single process, so it
|
||||
doesn't bog down the client machine. It can be configured to do HTTPS
|
||||
fetches as well.
|
||||
|
||||
WWW: ${HOMEPAGE}
|
||||
|
@ -1,3 +1,3 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2000/09/12 18:08:58 avsm Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.2 2001/08/06 00:35:05 brad Exp $
|
||||
bin/http_load
|
||||
man/man1/http_load.1
|
||||
man/cat1/http_load.0
|
||||
|
Loading…
Reference in New Issue
Block a user