From 1472849a6e4df8aeb15a83df2776ba55a966d2b2 Mon Sep 17 00:00:00 2001 From: Paul Traina Date: Sat, 3 Aug 1996 19:51:05 +0000 Subject: Re-import netperf package under benchmarks. Requested by: asami --- benchmarks/netperf/Makefile | 32 ++++ benchmarks/netperf/distinfo | 1 + benchmarks/netperf/files/patch-aa | 341 +++++++++++++++++++++++++++++++++++ benchmarks/netperf/pkg-comment | 1 + benchmarks/netperf/pkg-descr | 28 +++ benchmarks/netperf/pkg-plist | 10 + benchmarks/netperf/scripts/configure | 17 ++ 7 files changed, 430 insertions(+) create mode 100644 benchmarks/netperf/Makefile create mode 100644 benchmarks/netperf/distinfo create mode 100644 benchmarks/netperf/files/patch-aa create mode 100644 benchmarks/netperf/pkg-comment create mode 100644 benchmarks/netperf/pkg-descr create mode 100644 benchmarks/netperf/pkg-plist create mode 100644 benchmarks/netperf/scripts/configure (limited to 'benchmarks/netperf') diff --git a/benchmarks/netperf/Makefile b/benchmarks/netperf/Makefile new file mode 100644 index 000000000000..969712bd67ee --- /dev/null +++ b/benchmarks/netperf/Makefile @@ -0,0 +1,32 @@ +# New ports collection makefile for: netperf +# Version required: 2.1.1 +# Date created: 19 July 1996 +# Whom: koshy +# +# $Id: Makefile,v 1.3 1996/08/03 19:45:55 pst Exp $ +# + +DISTNAME= netperf-2.1pl1 +PKGNAME= netperf-2.1.1 +CATEGORIES+= benchmarks +MASTER_SITES= ftp://ftp.cup.hp.com/dist/networking/benchmarks/netperf/ + +MAINTAINER= pst@freebsd.org +MAKEFILE= makefile + +post-install: + strip ${PREFIX}/netperf/netperf + strip ${PREFIX}/netperf/netserver + cp ${WRKSRC}/netperf.man ${PREFIX}/man/man1/netperf.1 + cp ${WRKSRC}/netserver.man ${PREFIX}/man/man1/netserver.1 +.if !defined(NOMANCOMPRESS) + gzip -9nf ${PREFIX}/man/man1/netperf.1 + gzip -9nf ${PREFIX}/man/man1/netserver.1 +.endif +.if !defined(NOPORTDOCS) + mkdir -p ${PREFIX}/share/doc/netperf + cp ${WRKSRC}/netperf.ps ${PREFIX}/share/doc/netperf + gzip -9nf ${PREFIX}/share/doc/netperf/netperf.ps +.endif + +.include diff --git a/benchmarks/netperf/distinfo b/benchmarks/netperf/distinfo new file mode 100644 index 000000000000..b110097d8dc4 --- /dev/null +++ b/benchmarks/netperf/distinfo @@ -0,0 +1 @@ +MD5 (netperf-2.1pl1.tar.gz) = 845ef67c3bbece5e072712df06b84a60 diff --git a/benchmarks/netperf/files/patch-aa b/benchmarks/netperf/files/patch-aa new file mode 100644 index 000000000000..76491aad25b0 --- /dev/null +++ b/benchmarks/netperf/files/patch-aa @@ -0,0 +1,341 @@ +*** makefile.orig Thu Jul 25 12:54:42 1996 +--- makefile Sat Aug 3 12:24:17 1996 +*************** +*** 15,22 **** + # for the rest of the world, it is probably better to put the binaries + # in /usr/local/netperf or /opt/netperf + # +! #NETPERF_HOME = /usr/local/netperf +! NETPERF_HOME = /opt/netperf + + # The compiler on your system might be somewhere else, and/or have + # a different name. +--- 15,22 ---- + # for the rest of the world, it is probably better to put the binaries + # in /usr/local/netperf or /opt/netperf + # +! NETPERF_HOME = /usr/local/netperf +! #NETPERF_HOME = /opt/netperf + + # The compiler on your system might be somewhere else, and/or have + # a different name. +*************** +*** 36,42 **** + # You may safely ignore that warning. + # + +! CC = cc + + # Adding flags to CFLAGS enables some non-mainline features. For + # more information, please consult the source code. +--- 36,42 ---- + # You may safely ignore that warning. + # + +! CC = cc -Wall + + # Adding flags to CFLAGS enables some non-mainline features. For + # more information, please consult the source code. +*************** +*** 83,89 **** + # -U__hpux - Use this when compiling _on_ HP-UX *for* an HP-RT system + + LOG_FILE=DEBUG_LOG_FILE="\"/tmp/netperf.debug\"" +! CFLAGS = -O -Ae -D$(LOG_FILE) -DUSE_LOOPER + + # Some platforms, and some options, require additional libraries. + # you can add to the "LIBS =" line to accomplish this. if you find +--- 83,89 ---- + # -U__hpux - Use this when compiling _on_ HP-UX *for* an HP-RT system + + LOG_FILE=DEBUG_LOG_FILE="\"/tmp/netperf.debug\"" +! CFLAGS = %CFLAGS% -D$(LOG_FILE) -DUSE_LOOPER -DHISTOGRAM -DDO_UNIX + + # Some platforms, and some options, require additional libraries. + # you can add to the "LIBS =" line to accomplish this. if you find +*************** +*** 181,186 **** +--- 181,187 ---- + netserver.o: netserver.c nettest_bsd.h netlib.h makefile + + install: netperf netserver ++ mkdir -p $(NETPERF_HOME) + chmod -w *.[ch] + chmod +x $(NETPERF_SCRIPTS) + cp netperf $(NETPERF_HOME) +*** netlib.c.orig Thu Jul 25 12:54:36 1996 +--- netlib.c Sat Aug 3 12:42:13 1996 +*************** +*** 1285,1291 **** + dump_request(); + + fprintf(where, +! "\nsend_request: about to send %ld bytes from %p\n", + sizeof(netperf_request), + &netperf_request); + fflush(where); +--- 1285,1291 ---- + dump_request(); + + fprintf(where, +! "\nsend_request: about to send %d bytes from %p\n", + sizeof(netperf_request), + &netperf_request); + fflush(where); +*************** +*** 2785,2791 **** + /* program, but that doesn't really seem worthwhile - raj 4/95 */ + if (debug > 1) { + fprintf(where, +! "Looper child %d is born, pid %d\n", + child_index, + getpid()); + fflush(where); +--- 2785,2791 ---- + /* program, but that doesn't really seem worthwhile - raj 4/95 */ + if (debug > 1) { + fprintf(where, +! "Looper child %d is born, pid %ld\n", + child_index, + getpid()); + fflush(where); +*** netlib.h.orig Thu Jul 25 12:54:36 1996 +--- netlib.h Sat Aug 3 12:16:21 1996 +*************** +*** 262,267 **** +--- 262,268 ---- + extern int dl_open(); + extern char format_cpu_method(); + extern unsigned int convert(); ++ extern int delta_micro(); + + /* these are all for the confidence interval stuff */ + extern double confidence; +*************** +*** 274,279 **** +--- 275,285 ---- + #define HAVE_BCOPY + #define HAVE_BZERO + #endif ++ ++ #if defined(__FreeBSD__) || defined(__NetBSD__) ++ #define HAVE_BCOPY ++ #define HAVE_BZERO ++ #endif /* __FreeBSD__ || __NetBSD__ */ + + #ifndef HAVE_BCOPY + #define bcopy(s,d,h) memcpy((d),(s),(h)) +*** netserver.c.orig Thu Jul 25 12:54:36 1996 +--- netserver.c Sat Aug 3 12:16:21 1996 +*************** +*** 405,411 **** + fclose(stdin); + fclose(stderr); + /* can I just use setsid on all systems? raj 4/96 */ +! #if defined(__NetBSD__) || defined(__bsdi__) || defined(sun) || defined(__FREEBSD__) + setsid(); + #else + setpgrp(); +--- 405,411 ---- + fclose(stdin); + fclose(stderr); + /* can I just use setsid on all systems? raj 4/96 */ +! #if defined(__NetBSD__) || defined(__bsdi__) || defined(sun) || defined(__FreeBSD__) + setsid(); + #else + setpgrp(); +*** netsh.h.orig Thu Jul 25 12:54:36 1996 +--- netsh.h Sat Aug 3 12:16:21 1996 +*************** +*** 28,34 **** + #define REM_SEND_ALIGN 4 /* alignment for remote sends */ + + /* misc defines for the hell of it */ +! #define MAXLONG 4294967295L + + #ifndef NETSH + /* stuff to say where this test is going */ +--- 28,34 ---- + #define REM_SEND_ALIGN 4 /* alignment for remote sends */ + + /* misc defines for the hell of it */ +! #define MAXLONG 4294967295LU + + #ifndef NETSH + /* stuff to say where this test is going */ +*** nettest_bsd.c.orig Thu Jul 25 12:54:37 1996 +--- nettest_bsd.c Sat Aug 3 12:16:22 1996 +*************** +*** 54,59 **** +--- 54,60 ---- + #include + #include + #include ++ #include + #else /* WIN32 */ + #include + #include +*************** +*** 64,69 **** +--- 65,75 ---- + #include "netlib.h" + #include "netsh.h" + #include "nettest_bsd.h" ++ ++ #ifdef BSD ++ #include ++ #include ++ #endif /* BSD */ + + #ifdef HISTOGRAM + #include "hist.h" +*** nettest_unix.c.orig Thu Jul 25 12:54:39 1996 +--- nettest_unix.c Sat Aug 3 12:16:22 1996 +*************** +*** 45,51 **** + #include + #include + #include +! #ifndef __bsdi__ + #include + #endif + +--- 45,52 ---- + #include + #include + #include +! #include +! #ifndef BSD + #include + #endif + +*** snapshot_script.orig Thu Jul 25 12:54:35 1996 +--- snapshot_script Sat Aug 3 12:16:22 1996 +*************** +*** 34,40 **** + # + # where is netperf installed, there are a few possible places: + +! NETPERF_CMD=${NETPERF_CMD:=/opt/netperf} + + + # there should be no more than two parms passed +--- 34,40 ---- + # + # where is netperf installed, there are a few possible places: + +! NETPERF_CMD=${NETPERF_CMD:=/usr/local/netperf/netperf} + + + # there should be no more than two parms passed +*** tcp_range_script.orig Thu Jul 25 12:54:35 1996 +--- tcp_range_script Sat Aug 3 12:16:23 1996 +*************** +*** 43,49 **** + # where is netperf, and are there any "constant" options such as + # the netserver port number + #NETHOME=/usr/etc/net_perf +! NETHOME="." + NETPERF=$NETHOME/netperf $PORT + + # How accurate we want the estimate of performance: +--- 43,49 ---- + # where is netperf, and are there any "constant" options such as + # the netserver port number + #NETHOME=/usr/etc/net_perf +! NETHOME="/usr/local/netperf" + NETPERF=$NETHOME/netperf $PORT + + # How accurate we want the estimate of performance: +*** tcp_rr_script.orig Thu Jul 25 12:54:35 1996 +--- tcp_rr_script Sat Aug 3 12:16:23 1996 +*************** +*** 23,31 **** + fi + + # where the programs are +! #NETHOME=/usr/local/netperf + #NETHOME="/opt/netperf" +! NETHOME=. + + # at what port will netserver be waiting? If you decide to run + # netserver at a differnet port than the default of 12865, then set +--- 23,31 ---- + fi + + # where the programs are +! NETHOME=/usr/local/netperf + #NETHOME="/opt/netperf" +! #NETHOME=. + + # at what port will netserver be waiting? If you decide to run + # netserver at a differnet port than the default of 12865, then set +*** tcp_stream_script.orig Thu Jul 25 12:54:34 1996 +--- tcp_stream_script Sat Aug 3 12:16:23 1996 +*************** +*** 22,30 **** + fi + + # where the programs are +! #NETHOME=/usr/local/netperf + #NETHOME="/opt/netperf" +! NETHOME=. + + # at what port will netserver be waiting? If you decide to run + # netserver at a differnet port than the default of 12865, then set +--- 22,30 ---- + fi + + # where the programs are +! NETHOME=/usr/local/netperf + #NETHOME="/opt/netperf" +! #NETHOME=. + + # at what port will netserver be waiting? If you decide to run + # netserver at a differnet port than the default of 12865, then set +*** udp_rr_script.orig Thu Jul 25 12:54:35 1996 +--- udp_rr_script Sat Aug 3 12:16:23 1996 +*************** +*** 20,28 **** + + # where the programs are + +! #NETHOME=/usr/local/netperf + #NETHOME="/opt/netperf" +! NETHOME="." + + # at what port will netserver be waiting? If you decide to run + # netserver at a differnet port than the default of 12865, then set +--- 20,28 ---- + + # where the programs are + +! NETHOME=/usr/local/netperf + #NETHOME="/opt/netperf" +! #NETHOME="." + + # at what port will netserver be waiting? If you decide to run + # netserver at a differnet port than the default of 12865, then set +*** udp_stream_script.orig Thu Jul 25 12:54:34 1996 +--- udp_stream_script Sat Aug 3 12:16:23 1996 +*************** +*** 17,25 **** + + # where the programs are + +! #NETHOME=/usr/local/netperf + #NETHOME="/opt/netperf" +! NETHOME="." + + # at what port will netserver be waiting? If you decide to run + # netserver at a differnet port than the default of 12865, then set +--- 17,25 ---- + + # where the programs are + +! NETHOME=/usr/local/netperf + #NETHOME="/opt/netperf" +! #NETHOME="." + + # at what port will netserver be waiting? If you decide to run + # netserver at a differnet port than the default of 12865, then set diff --git a/benchmarks/netperf/pkg-comment b/benchmarks/netperf/pkg-comment new file mode 100644 index 000000000000..b68e02217d1d --- /dev/null +++ b/benchmarks/netperf/pkg-comment @@ -0,0 +1 @@ +Rick Jones' network performance benchmarking package. diff --git a/benchmarks/netperf/pkg-descr b/benchmarks/netperf/pkg-descr new file mode 100644 index 000000000000..902330080239 --- /dev/null +++ b/benchmarks/netperf/pkg-descr @@ -0,0 +1,28 @@ +Netperf is a serious networking performance evaluation tool being +distributed under GPL by HP's Information Networks Division. +Testing is done using a pair of programs: `netserver' (the server) and +`netperf' (the measurement tool). + +Netperf allows control over a large number of test `variables'. +Some of these are: + + * specification of desired confidence levels for the tests + Netperf will warn the user if these levels were not achieved. + * filling send buffers with specified data (to beat compression schemes) + * specification of send/recieve buffer alignments and data offsets + * requesting cpu utilization and service demand calculations + * specification of sizes of data to send + +Netperf can be used for measuring stream performance as well as +round-trip performance. + +This port of netperf has been configured to support: + + TCP and UDP via BSD sockets + Unix domain sockets + +For further information on Netperf, please lookup: + + http://www.cup.hp.com/netperf/NetperfPage.html + +- Koshy diff --git a/benchmarks/netperf/pkg-plist b/benchmarks/netperf/pkg-plist new file mode 100644 index 000000000000..df07d21723bf --- /dev/null +++ b/benchmarks/netperf/pkg-plist @@ -0,0 +1,10 @@ +netperf/netperf +netperf/netserver +netperf/tcp_range_script +netperf/tcp_stream_script +netperf/tcp_rr_script +netperf/udp_stream_script +netperf/udp_rr_script +netperf/snapshot_script +share/doc/netperf/netperf.ps.gz +man/man1/netperf.1.gz diff --git a/benchmarks/netperf/scripts/configure b/benchmarks/netperf/scripts/configure new file mode 100644 index 000000000000..e2aab28b4bcf --- /dev/null +++ b/benchmarks/netperf/scripts/configure @@ -0,0 +1,17 @@ +#!/bin/sh +# +cd $WRKSRC +# +# If this is FreeBSD 2.2 or later, this will work. Older FreeBSD versions +# will set CFLAGS to "". Life's a bitch. +# +CFLAGS=`make -V CFLAGS echo` || echo "*** Ignore this error" + +if [ X"$CFLAGS" = X ] ; then + CFLAGS="-O2 -fno-strength-reduce" +fi + +echo "Setting CFLAGS to \"$CFLAGS\"" +sed -e "s/%CFLAGS%/${CFLAGS}/" makefile >makefile.new +mv -f makefile makefile.orig2 +mv -f makefile.new makefile -- cgit v1.2.3