Permalink
Browse files

Import mar2006 tarball from http://acme.com/software/http_load/

  • Loading branch information...
0 parents commit ae288cfb14089dead68701620881c05735009c33 @ConradIrwin committed Feb 10, 2012
Showing with 2,705 additions and 0 deletions.
  1. +10 −0 FILES
  2. +54 −0 Makefile
  3. +29 −0 README
  4. +159 −0 http_load.1
  5. +1,857 −0 http_load.c
  6. +47 −0 make_test_files
  7. +107 −0 port.h
  8. +328 −0 timers.c
  9. +106 −0 timers.h
  10. +8 −0 version.h
10 FILES
@@ -0,0 +1,10 @@
+Makefile
+README
+http_load.1
+http_load.c
+make_test_files
+port.h
+timers.c
+timers.h
+version.h
+FILES
@@ -0,0 +1,54 @@
+# Makefile for http_load
+
+# CONFIGURE: If you are using a SystemV-based operating system, such as
+# Solaris, you will need to uncomment this definition.
+#SYSV_LIBS = -lnsl -lsocket -lresolv
+
+# CONFIGURE: If you want to compile in support for https, uncomment these
+# definitions. You will need to have already built OpenSSL, available at
+# http://www.openssl.org/ Make sure the SSL_TREE definition points to the
+# tree with your OpenSSL installation - depending on how you installed it,
+# it may be in /usr/local instead of /usr/local/ssl.
+#SSL_TREE = /usr/local/ssl
+#SSL_DEFS = -DUSE_SSL
+#SSL_INC = -I$(SSL_TREE)/include
+#SSL_LIBS = -L$(SSL_TREE)/lib -lssl -lcrypto
+
+
+BINDIR = /usr/local/bin
+MANDIR = /usr/local/man/man1
+CC = gcc -Wall
+CFLAGS = -O $(SRANDOM_DEFS) $(SSL_DEFS) $(SSL_INC)
+#CFLAGS = -g $(SRANDOM_DEFS) $(SSL_DEFS) $(SSL_INC)
+LDFLAGS = -s $(SSL_LIBS) $(SYSV_LIBS)
+#LDFLAGS = -g $(SSL_LIBS) $(SYSV_LIBS)
+
+all: http_load
+
+http_load: http_load.o timers.o
+ $(CC) $(CFLAGS) http_load.o timers.o $(LDFLAGS) -o http_load
+
+http_load.o: http_load.c timers.h port.h
+ $(CC) $(CFLAGS) -c http_load.c
+
+timers.o: timers.c timers.h
+ $(CC) $(CFLAGS) -c timers.c
+
+install: all
+ rm -f $(BINDIR)/http_load
+ cp http_load $(BINDIR)
+ rm -f $(MANDIR)/http_load.1
+ cp http_load.1 $(MANDIR)
+
+clean:
+ rm -f http_load *.o core core.* *.core
+
+tar:
+ @name=`sed -n -e '/define VERSION /!d' -e 's,.*http_load ,http_load-,' -e 's,",,p' version.h` ; \
+ rm -rf $$name ; \
+ mkdir $$name ; \
+ tar cf - `cat FILES` | ( cd $$name ; tar xfBp - ) ; \
+ chmod 644 $$name/Makefile ; \
+ tar cf $$name.tar $$name ; \
+ rm -rf $$name ; \
+ gzip $$name.tar
29 README
@@ -0,0 +1,29 @@
+ http_load - multiprocessing http test client
+ version of 12mar2006
+
+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.
+
+See the manual entry for more details.
+
+Files in this distribution:
+
+ README this
+ Makefile guess
+ http_load.c source file
+ http_load.1 manual entry
+ timers.c timers package
+ timers.h headers for timers package
+ make_test_files simple script to create a set of test files
+
+To build: If you're on a SysV-like machine (which includes old Linux systems
+but not new Linux systems), edit the Makefile and uncomment the SYSV_LIBS
+line. If you're doing SSL, uncomment those lines too. Otherwise, just do
+a make.
+
+Feedback is welcome - send bug reports, enhancements, checks, money
+orders, etc. to the addresses below.
+
+ Jef Poskanzer jef@mail.acme.com http://www.acme.com/jef/
@@ -0,0 +1,159 @@
+.TH http_load 1 "15 November 2001"
+.SH NAME
+http_load - multiprocessing http test client
+.SH SYNOPSIS
+.B http_load
+.RB [ -checksum ]
+.RB [ -throttle ]
+.RB [ -proxy
+.IR host:port ]
+.RB [ -verbose ]
+.RB [ -timeout
+.IR secs ]
+.RB [ -sip
+.IR sip_file ]
+.RB [ -cipher
+.IR str ]
+.RI (
+.BI -parallel
+.IR N
+.RI |
+.BI -rate
+.IR N
+.RB [ -jitter ]
+.RI )
+.RI (
+.BI -fetches
+.IR N
+.RI |
+.BI -seconds
+.IR N
+.RI )
+.I url_file
+.SH DESCRIPTION
+.PP
+.I 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.
+.PP
+The -checksum flag tells
+.I http_load
+to do checksums on the files fetched, to make sure they came across ok.
+The checksums are computed the first time each URL gets fetched,
+and then recomputed and compared on each subsequent fetch.
+Without the -checksum flag only the byte count is checked.
+.PP
+The -throttle flag tells
+.I http_load
+to throttle its consumption of data to 33.6Kbps, to simulate access
+by modem users.
+.PP
+The -proxy flag lets you run http_load through a web proxy.
+.PP
+The -verbose flag tells
+.I http_load
+to put out progress reports every minute on stderr.
+.PP
+The -timeout flag specifies how long to wait on idle connections before
+giving up.
+The default is 60 seconds.
+.PP
+The -sip flag lets you specify a file containing numeric IP addresses
+(not hostnames), one per line.
+These get used randomly as the *source* address of connections.
+They must be real routable addresses on your machine, created
+with ifconfig, in order for this to work.
+The advantage of using this option is you can make one client machine
+look like a whole bank of machines, as far as the server knows.
+.PP
+The -cipher flag is only available if you have SSL support compiled in.
+It specifies a cipher set to use.
+By default, http_load will negotiate the highest security that the server
+has available, which is often higher (and slower) than typical browsers
+will negotiate.
+An example of a cipher set might be "RC4-MD5" - this will run
+considerably faster than the default.
+In addition to specifying a raw cipher string, there are three built-in
+cipher sets accessible by keywords:
+.nf
+ * fastsec - fast security - RC4-MD5
+ * highsec - high security - DES-CBC3-SHA
+ * paranoid - ultra high security - AES256-SHA
+.fi
+Of course, not all servers are guaranteed to implement these combinations.
+.PP
+One start specifier, either -parallel or -rate, is required.
+-parallel tells
+.I http_load
+to keep that many parallel fetches going simultaneously.
+-rate tells
+.I http_load
+to start that many new connections each second.
+If you use the -rate start specifier, you can also give the -jitter
+flag, telling
+.I http_load
+to vary the rate randomly by about 10%.
+.PP
+One end specifier, either -fetches or -seconds, is required.
+-fetches tells
+.I http_load
+to quit when that many fetches have been completed.
+-seconds tells
+.I http_load
+to quit after that many seconds have elapsed.
+.PP
+The url_file is just a list of URLs, one per line.
+The URLs that get fetched are chosen randomly from this file.
+.PP
+All flags may be abbreviated to a single letter.
+.PP
+Note that while the end specifier is obeyed precisely, the start specifier
+is only approximate.
+If you use the -rate flag,
+.I http_load
+will make its best effort to start connections at that rate, but may
+not succeed.
+And if you use the -parallel flag,
+.I http_load
+will attempt to keep that many simultaneous connections going, but
+may fail to keep up if the server is very fast.
+.PP
+Sample run:
+.nf
+ % 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
+ msecs/connect: 28.8932 mean, 44.243 max, 24.488 min
+ msecs/first-response: 63.5362 mean, 81.624 max, 57.803 min
+ HTTP response codes:
+ code 200 -- 591
+.fi
+.SH "SEE ALSO"
+http_ping(1)
+.SH AUTHOR
+Copyright © 1998,1999,2001 by Jef Poskanzer <jef@mail.acme.com>.
+All rights reserved.
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
Oops, something went wrong.

0 comments on commit ae288cf

Please sign in to comment.