Commits

Anonymous committed 6e91ee4

Add gatling benchmark, the code is from http://bulk.fefe.de/scalability/#code

Comments (0)

Files changed (986)

 
 linux*/
 mmapbench/share.dat
+dbench*/

gatling/.cvsignore

+gatling
+version.h
+*bench
+dl
+ioerr
+mktestdata
+libiconv
+libsocket
+dummy.c
+rand.dat
+cakey.key
+cakey.csr
+server.pem
+cakey.pem
+getrusage
+default
+tlsgatling
+smb
+logs
+results
+cgi
+libcrypt
+getlinks
+rellink
+acc
+referrer
+havesetresuid.h
+hcat
+set args -i 127.0.0.1 -O 'F/127.0.0.1/8001/\.php'
+0.12:
+  fix http ranges for Range: bytes=0-, would trigger 416 before
+    (Sebastian K�hler)
+
+0.11:
+  add proxy support to dl ($http_proxy and $ftp_proxy like libwww)
+  setuid in the forkslave, too
+  fix the symlink to directory entries (Olaf Dreesen)
+  close ftp-uploaded files in cleanup() (Johannes Ziemke)
+  fix some bizarre ftp races that caused assertion failures (Johannes Ziemke)
+  look for theora in .ogg files and say they are video/ogg (requires
+    SUPPORT_MIMEMAGIC)
+
+0.10:
+  add multi-ranges (only used by the Acrobat Reader plugin AFAIK)
+  abstract out accept() deferment to libowfat (socket_deferaccept)
+  add read-only SMB support
+  add lame anti-DOS support (see README.antidos)
+  sort the other way around in referer
+  dl in http mode now supports cookies and sets the referer
+  add SSH forwarding to SSL support (see README.tls)
+  add matchiprange (see comment at top of matchiprange.c)
+  fix a few CGI problems report by Andreas Stuehrk
+
+0.9:
+  add /server-status
+  request_done, socket_error and cgiproxy_read0 now print the number of
+    received and sent bytes in this request, to make traffic accounting
+    for CGIs and broken downloads possible
+  you can now say -C+x and then all executable files will be run as CGI.
+    Also works for index.html.  Please note that this is dangerous in
+    case you copy or serve files off a FAT or similar filesystem, where
+    Linux per default marks every file executable.  That's why gatling
+    has a simple sanity check that only allows scripts starting with #!
+    or ELF binaries.
+  add "bench", a small benchmark util in the spirit of apachebench
+  make bzip2 support optional (and disable it per default)
+  add Date header
+  add MIME magic (will try to identify file type by looking at first bytes)
+    this is only used if the extension is not conclusive
+  also log the GET arguments in the log for CGI requests
+  allow .htaccess_global
+  dl can now follow 301, 302 and 302
+  fix .gz handling
+  tell download accelerators that we support ranges
+  add acc (convert gatling log to one-line-per-request)
+  add hcat (like cat, but sorts multilog style @[timestamp] filenames
+    right)
+  add referrer (extract nice external referrer statistics from acc
+    output, before or after tai64nlocal)
+  use setresuid and setresgid if available
+  for HEAD, suppress body of error messages (Andreas Krennmair)
+  use radix sort in readfrag instead of qsort for big speedup
+  add support for external mime types file (gatling -m /etc/mime.types)
+  switch to binary mode in dl in FTP mode
+  fix memory leak in proxy_connection() (Johannes Vetter)
+  dl: when printing an ftp directory listing, filter \r
+  dl: in -i mode, don't complain if utime fails
+  attempt to fix POST
+  make dl print some statistics if stderr is a TTY
+
+0.8:
+  fix pipelining bug
+  send all HTTP headers als HTTP_FOO=bar environment to CGIs
+  gcc 4 unsigned char* <-> char* cleanups
+  add temporary fallback redirect (see README.redir)
+  only fork cgi slave if -C is given on command line
+  IRIX compatibility (yuck!)
+
+0.7:
+  use the new scan_urlencoded2 (libowfat cvs); properly serve
+    libstdc++.tar.gz and not 404
+
+0.6:
+  implement ABOR (ncftp was confused after aborting a connection)
+  add https support (using OpenSSL)
+  add primitive .htaccess support
+  fix http ranges (Joachim Berdal Haga via Gerrit Pape, reported for
+    fnord but also applied here)
+
+0.5:
+  CGI-through-proxy support (read README.proxy)
+  SIGHUP will close server sockets but continue serving open requests
+  add man page
+  fix HTTP pipelining fd leak
+  add broken-symlink-redirect like fnord does (read README.redirect)
+  output size in log as 64-bit number
+  add resume support to dl
+  support POST for CGI proxy
+  fix HEAD fd leak (oops)
+  experimental CGI support
+  add -l option to make FTP server ask for password
+    (works around buggy proxy servers, e.g. Genugate)
+
+0.4:
+  add primitive FTP support (default: enabled; disable with -F!)
+  add pipelining support (for both FTP and HTTP)
+
+0.3:
+  add chroot+setuid support
+  compiler warnings removed (Julien Touche)
+  also take time for reaping in forkbench (Niels Provos)
+  fix memory and fd leaks (with Thomas Walpuski)
+
+0.2:
+  zlib support (directory listings only)
+  add timeout support
+  add major kludgery to work around deliberate IPv6 breakage on OpenBSD
+    from that itojun maniac.  Friends don't let friends run OpenBSD!
+  add httpbench
+
+0.1:
+  directory listings
+  HEAD
+  if-modified-since
+  ranges (resume)
+
+0.0:
+  initial checkin, proof-of-concept taken from libowfat test/httpd.c

gatling/CVS/Entries

+/.cvsignore/1.17/Fri Oct 12 13:31:23 2007//
+/.gdbinit/1.10/Sat Jan  9 02:29:56 2010//
+/CHANGES/1.79/Fri Nov 20 15:20:35 2009//
+/GNUmakefile/1.69/Mon Jan  4 21:04:35 2010//
+/LICENSE/1.1/Fri Feb 18 23:11:33 2005//
+/Makefile/1.67/Mon Jan  4 21:01:03 2010//
+/README/1.1/Tue Oct  7 20:08:07 2003//
+/README.antidos/1.1/Tue Apr  8 05:34:07 2008//
+/README.bindbench/1.1/Thu Oct  9 22:35:10 2003//
+/README.cgi/1.3/Tue Jun  2 00:45:50 2009//
+/README.forkbench/1.1/Thu Oct  9 21:41:57 2003//
+/README.ftp/1.3/Tue Jun  2 00:45:50 2009//
+/README.htaccess/1.2/Mon Oct 31 17:55:57 2005//
+/README.http/1.2/Tue Jun  2 00:45:50 2009//
+/README.httpbench/1.4/Tue Jun  2 00:45:50 2009//
+/README.manymapbench/1.1/Thu Oct 23 21:12:56 2003//
+/README.mmapbench/1.2/Tue Nov 11 14:17:19 2003//
+/README.performance/1.2/Wed Jan 14 01:16:18 2004//
+/README.php/1.1/Sat Jan  9 02:45:22 2010//
+/README.prefetch/1.2/Wed Jan  7 19:43:43 2004//
+/README.proxy/1.6/Sat Jan  9 02:45:22 2010//
+/README.redirect/1.3/Tue May 17 12:51:36 2005//
+/README.tls/1.2/Tue Sep 23 15:22:40 2008//
+/TODO/1.9/Fri Sep 23 10:58:07 2005//
+/acc.c/1.5/Mon Aug  3 22:07:57 2009//
+/acc.pl/1.3/Thu Apr  9 17:12:23 2009//
+/bench.1/1.1/Thu Sep 29 12:21:48 2005//
+/bench.c/1.17/Mon Aug 17 01:55:38 2009//
+/bindbench.c/1.7/Thu Jan  8 15:31:27 2004//
+/cgi.c/1.4/Sat Jan  9 02:29:56 2010//
+/common.c/1.5/Tue Jan  5 14:37:47 2010//
+/connstat.c/1.3/Sat Apr 12 17:53:28 2008//
+/dl.c/1.67/Sun Aug 23 04:37:55 2009//
+/forkbench.c/1.13/Fri Nov  7 00:28:57 2003//
+/ftp.c/1.9/Fri Jan  8 17:07:42 2010//
+/gatling.1/1.10/Sat Jan  9 02:45:22 2010//
+/gatling.c/1.249/Sat Jan  9 02:29:56 2010//
+/gatling.h/1.18/Fri Jan  8 17:07:42 2010//
+/gatling_features.h/1.1/Thu Jan 31 17:33:47 2008//
+/genofsmacro.pl/1.2/Tue Apr  8 05:34:07 2008//
+/getlinks.c/1.7/Mon Aug 17 01:55:38 2009//
+/getrusage.c/1.1/Wed Mar 30 14:28:50 2005//
+/hcat.c/1.4/Thu Oct 18 23:53:41 2007//
+/http.c/1.20/Sat Jan  9 03:00:21 2010//
+/httpbench.c/1.21/Thu May 18 06:18:50 2006//
+/ioerr.c/1.4/Thu May 18 06:18:50 2006//
+/manymapbench.c/1.2/Thu Oct 23 21:12:56 2003//
+/matchiprange.c/1.3/Tue Jun  2 00:45:50 2009//
+/mime.c/1.8/Fri Oct  9 00:12:03 2009//
+/mktestdata.c/1.3/Thu Nov  6 21:30:28 2003//
+/mmapbench.c/1.5/Fri Oct 24 23:14:20 2003//
+/prep/1.8/Wed Aug 24 16:31:35 2005//
+/pthreadbench.c/1.3/Thu Nov  6 21:30:28 2003//
+/readfrag.c/1.2/Fri Dec  1 21:52:29 2006//
+/referrer.c/1.4/Tue Jun  2 00:45:50 2009//
+/rellink.c/1.4/Mon Aug 17 01:55:38 2009//
+/run-bench/1.4/Fri Nov 14 15:20:57 2003//
+/run-gatling/1.1/Thu Oct  9 23:59:12 2003//
+/run-valgrind/1.2/Sat Nov  1 00:48:34 2003//
+/smb.c/1.26/Fri Oct  9 19:51:58 2009//
+/ssl.c/1.2/Thu Nov 13 17:49:33 2008//
+/torrent.c/1.2/Mon Aug 17 01:55:38 2009//
+/tryalloca.c/1.1/Mon Aug 17 01:55:38 2009//
+/trycrypt.c/1.1/Mon Jul 25 19:15:44 2005//
+/tryiconv.c/1.1/Thu Jan  8 15:21:57 2004//
+/trymd5.c/1.1/Wed Feb 20 00:38:55 2008//
+/trysetresuid.c/1.1/Sat Jul 29 15:06:01 2006//
+/trysocket.c/1.2/Thu Jul 27 05:24:39 2006//
+D

gatling/CVS/Repository

+gatling
+:pserver:cvs@cvs.fefe.de:/cvs

gatling/CVS/Template

Empty file added.

gatling/GNUmakefile

+#DEBUG=1
+ZLIB=1
+prefix=/opt/diet
+BINDIR=${prefix}/bin
+MANDIR=${prefix}/man
+man1dir=$(MANDIR)/man1
+
+TARGETS=gatling httpbench bindbench dl ioerr bench tlsgatling \
+pthreadbench cgi
+TARGETS2=mktestdata mmapbench manymapbench forkbench forksbench
+ALLTARGETS=$(TARGETS) acc hcat referrer hitprofile matchiprange getlinks \
+rellink $(TARGETS2)
+
+all: $(ALLTARGETS)
+
+CROSS=
+#CROSS=i686-mingw32-
+CC=$(CROSS)gcc
+CFLAGS=-pipe -Wall
+LDFLAGS=
+
+path = $(subst :, ,$(PATH))
+diet_path = $(foreach dir,$(path),$(wildcard $(dir)/diet))
+ifeq ($(strip $(diet_path)),)
+ifneq ($(wildcard /opt/diet/bin/diet),)
+DIET=/opt/diet/bin/diet
+else
+DIET=
+endif
+else
+DIET:=$(strip $(diet_path))
+endif
+
+# to build without diet libc support, use $ make DIET=
+# see http://www.fefe.de/dietlibc/ for details about the diet libc
+
+ifneq ($(DEBUG),)
+CFLAGS+=-g
+LDFLAGS+=-g
+else
+CFLAGS+=-O2 -fomit-frame-pointer -I/usr/local/include
+LDFLAGS+=-s
+ifneq ($(DIET),)
+DIET+=-Os
+endif
+endif
+
+LDLIBS=-lowfat
+
+ifeq ($(ZLIB),1)
+CFLAGS+=-DUSE_ZLIB
+LDLIBS+=-lz
+endif
+
+libowfat_path = $(strip $(foreach dir,../libowfat*,$(wildcard $(dir)/textcode.h)))
+ifneq ($(libowfat_path),)
+CFLAGS+=$(foreach fnord,$(libowfat_path),-I$(dir $(fnord)))
+LDFLAGS+=$(foreach fnord,$(libowfat_path),-L$(dir $(fnord)))
+endif
+
+ifneq ($(REDIRECT),)
+CFLAGS+="-DREDIRECT=\"$(REDIRECT)\""
+endif
+
+acc: acc.c
+	$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) -lowfat
+
+CC:=$(DIET) $(CC)
+
+pthreadbench: pthreadbench.o
+	$(CC) $< -o $@ -I. $(CFLAGS) $(LDFLAGS) $(LDLIBS) -lpthread
+
+forksbench: forkbench.o
+	$(CC) -static -o $@ forkbench.o $(LDFLAGS) $(LDLIBS)
+
+gatling.o tlsgatling: havesetresuid.h
+
+OBJS=mime.o ftp.o http.o smb.o common.o connstat.o
+HTTPS_OBJS=mime.o ftp.o https.o smb.o common.o connstat.o
+
+$(OBJS) https.o gatling.o: gatling.h version.h gatling_features.h
+
+tlsgatling: gatling.c ssl.o $(HTTPS_OBJS)
+	-$(CC) -o $@ gatling.c ssl.o $(HTTPS_OBJS) $(CFLAGS) -DSUPPORT_HTTPS $(LDFLAGS) -lssl -lcrypto $(LDLIBS)
+
+gatling: gatling.o $(OBJS) md5lib
+	$(CC) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LDLIBS) `cat md5lib`
+
+httpbench: httpbench.o
+bindbench: bindbench.o
+dl: dl.o
+ioerr: ioerr.o
+bench: bench.o
+getlinks: getlinks.o
+rellink: rellink.o
+matchiprange: matchiprange.o
+
+cgi: cgi.o
+
+version.h: CHANGES
+	(head -n 1 CHANGES | sed 's/\([^:]*\):/#define VERSION "\1"/') > version.h
+
+%.o: %.c
+	$(CC) -c $< -o $@ -I. $(CFLAGS)
+
+https.o: http.c
+	$(CC) -c $< -o $@ -I. $(CFLAGS) -DSUPPORT_HTTPS
+
+%: %.o
+	$(CC) $(LDFLAGS) $@.o -o $@ $(LDLIBS)
+
+hitprofile.o: referrer.c
+	$(CC) -c $< -o $@ -I. $(CFLAGS) -DALL
+
+libsocket: trysocket.c
+	if $(CC) $(CFLAGS) -o trysocket trysocket.c >/dev/null 2>&1; then echo ""; else \
+	if $(CC) $(CFLAGS) -o trysocket trysocket.c -lsocket >/dev/null 2>&1; then echo "-lsocket"; else \
+	if $(CC) $(CFLAGS) -o trysocket trysocket.c -lsocket -lnsl >/dev/null 2>&1; then echo "-lsocket -lnsl"; else \
+	if $(CC) $(CFLAGS) -o trysocket trysocket.c -lwsock32 >/dev/null 2>&1; then echo "-lwsock32"; \
+	fi; fi; fi; fi > libsocket
+	rm -f trysocket
+
+libiconv: tryiconv.c
+	if $(CC) $(CFLAGS) -o tryiconv tryiconv.c >/dev/null 2>&1; then echo ""; else \
+	if $(CC) $(CFLAGS) -o tryiconv tryiconv.c -liconv >/dev/null 2>&1; then echo "-liconv"; else \
+	if $(CC) $(CFLAGS) -o tryiconv tryiconv.c -L/usr/local/lib -liconv >/dev/null 2>&1; then \
+	  echo "-L/usr/local/lib -liconv"; \
+	fi; fi; fi > libiconv
+	rm -f tryiconv
+
+libcrypt: trycrypt.c
+	if $(CC) $(CFLAGS) -o trycrypt trycrypt.c >/dev/null 2>&1; then echo ""; else \
+	if $(CC) $(CFLAGS) -o trycrypt trycrypt.c -lcrypt >/dev/null 2>&1; then echo "-lcrypt"; \
+	fi; fi > libcrypt
+	rm -f trycrypt
+
+md5lib: trymd5.c
+	if $(CC) $(CFLAGS) -o trymd5 trymd5.c >/dev/null 2>&1; then echo ""; else \
+	if $(CC) $(CFLAGS) -o trymd5 trymd5.c -lmd >/dev/null 2>&1; then echo "-lmd"; else \
+	if $(CC) $(CFLAGS) -o trymd5 trymd5.c -lcrypto >/dev/null 2>&1; then echo "-lcrypto"; \
+	fi; fi; fi > md5lib
+	rm -f trymd5
+
+havesetresuid.h: trysetresuid.c
+	-rm -f $@
+	if $(CC) $(CFLAGS) -o tryresuid $^ >/dev/null 2>&1; then echo "#define LIBC_HAS_SETRESUID"; fi > $@
+	-rm -f tryresuid
+
+dummy.c:
+	touch $@
+
+libsocketkludge.a: libsocket libiconv dummy.o
+	ar q $@ dummy.o
+	-ranlib $@
+
+LDLIBS+=`cat libsocket libiconv libcrypt`
+
+$(TARGETS): libsocketkludge.a libsocket libiconv libcrypt md5lib
+
+install: gatling dl getlinks
+	install -d $(DESTDIR)$(BINDIR) $(man1dir)
+	install $^ $(DESTDIR)$(BINDIR)
+	if test -f tlsgatling; then install tlsgatling $(DESTDIR)$(BINDIR); fi
+	install -m 644 gatling.1 bench.1 $(DESTDIR)$(man1dir)
+
+uninstall:
+	rm -f $(DESTDIR)$(BINDIR)/gatling $(DESTDIR)$(BINDIR)/tlsgatling $(DESTDIR)$(man1dir)/gatling.1 $(DESTDIR)$(man1dir)/bench.1
+
+clean:
+	rm -f $(ALLTARGETS) *.o version.h core *.core libsocket libsocketkludge.a dummy.c libiconv libcrypt havesetresuid.h md5lib
+
+VERSION=gatling-$(shell head -n 1 CHANGES|sed 's/://')
+CURNAME=$(notdir $(shell pwd))
+
+rename:
+	if test $(CURNAME) != $(VERSION); then cd .. && mv $(CURNAME) $(VERSION); fi
+
+tar: clean rename
+	rm -f dep libdep
+	cd ..; tar cvvf $(VERSION).tar.bz2 --use=bzip2 --exclude CVS $(VERSION)
+
+cert: server.pem
+
+rand.dat:
+	-dd if=/dev/random of=rand.dat bs=1024 count=1
+
+cakey.key: rand.dat
+	openssl genrsa -out cakey.key -rand rand.dat 2048
+
+cakey.csr: cakey.key
+	openssl req -new -key cakey.key -out cakey.csr
+
+cakey.pem: cakey.key cakey.csr
+	openssl x509 -req -days 1780 -set_serial 1 -in cakey.csr \
+	  -signkey cakey.key -out $@
+
+server.pem: cakey.key cakey.pem
+	cat cakey.key cakey.pem > server.pem
+
+windoze:
+	$(MAKE) DIET= CROSS=i686-mingw32-
+
+havealloca.h: tryalloca.c
+	-rm -f $@
+	echo "#include <stdlib.h>" > $@
+	if $(DIET) $(CC) $(CFLAGS) -c tryalloca.c -DA >/dev/null 2>&1; then echo "#include <alloca.h>"; fi >> $@
+	if $(DIET) $(CC) $(CFLAGS) -c tryalloca.c -DB >/dev/null 2>&1; then echo "#include <malloc.h>"; fi >> $@
+	-rm -f tryalloca.o
+
+bench.o bindbench.o common.o dl.o ftp.o gatling.o getlinks.o http.o \
+httpbench.o ioerr.o rellink.o smb.o torrent.o: havealloca.h
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                          675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+prefix=/usr/local
+BINDIR=${prefix}/bin
+MANDIR=${prefix}/man
+man1dir=$(MANDIR)/man1
+
+TARGET=gatling httpbench dl bindbench mmapbench forkbench pthreadbench \
+mktestdata manymapbench ioerr bench tlsgatling forksbench cgi getlinks \
+acc hcat referrer hitprofile matchiprange
+
+all: $(TARGET)
+
+CC=gcc
+CFLAGS=-pipe -Wall -O -I../libowfat/
+LDFLAGS=-s -L../libowfat/ -lowfat
+
+OBJS=mime.o ftp.o http.o smb.o common.o connstat.o
+HTTPS_OBJS=mime.o ftp.o https.o smb.o common.o connstat.o
+
+$(OBJS) https.o gatling.o: gatling.h version.h gatling_features.h
+
+gatling: gatling.o $(OBJS) libsocket libiconv libcrypt md5lib
+	$(CC) -o $@ gatling.o $(OBJS) $(LDFLAGS) `cat libsocket libiconv libcrypt md5lib`
+
+httpbench: httpbench.o libsocket
+	$(CC) -o $@ httpbench.o $(LDFLAGS) `cat libsocket`
+
+dl: dl.o libsocket
+	$(CC) -o $@ dl.o $(LDFLAGS) `cat libsocket`
+
+bindbench: bindbench.o libsocket
+	$(CC) -o $@ bindbench.o $(LDFLAGS) `cat libsocket`
+
+mmapbench: mmapbench.o
+	$(CC) -o $@ mmapbench.o $(LDFLAGS)
+
+forkbench: forkbench.o
+	$(CC) -o $@ forkbench.o $(LDFLAGS)
+
+forksbench: forkbench.o
+	$(CC) -static -o $@ forkbench.o $(LDFLAGS)
+
+pthreadbench: pthreadbench.o
+	$(CC) -o $@ pthreadbench.o $(LDFLAGS) -lpthread
+
+mktestdata: mktestdata.o
+	$(CC) -o $@ mktestdata.o $(LDFLAGS)
+
+manymapbench: manymapbench.o
+	$(CC) -o $@ manymapbench.o $(LDFLAGS)
+
+bench: bench.o
+	$(CC) -o $@ bench.o $(LDFLAGS)
+
+ioerr: ioerr.o libsocket
+	$(CC) -o $@ ioerr.o $(LDFLAGS) `cat libsocket`
+
+acc: acc.o
+	$(CC) -o $@ acc.o $(LDFLAGS)
+
+cgi: cgi.o
+	$(CC) -o $@ cgi.o $(LDFLAGS)
+
+getlinks: getlinks.o
+	$(CC) -o $@ getlinks.o $(LDFLAGS)
+
+matchiprange: matchiprange.o
+	$(CC) -o $@ matchiprange.o $(LDFLAGS)
+
+gatling.o: version.h gatling.h havesetresuid.h
+
+version.h: CHANGES