From ed9d1ac3d5359d3f02c636eaeefcc7fa4d2cd1b2 Mon Sep 17 00:00:00 2001 From: bluhm Date: Mon, 18 May 2020 13:38:42 +0000 Subject: [PATCH] import nuttcp 8.2.2 OK sthen@ Comment: network performance measurement tool Description: nuttcp is a network performance measurement tool intended for use by network and system managers. Its most basic usage is to determine the raw TCP (or UDP) network layer throughput by transferring memory buffers from a source system across an interconnecting network to a destination system, either transferring data for a specified time interval, or alternatively transferring a specified number of bytes. In addition to reporting the achieved network throughput in Mbps, nuttcp also provides additional useful information related to the data transfer such as user, system, and wall-clock time, transmitter and receiver CPU utilization, and loss percentage (for UDP transfers). --- benchmarks/nuttcp/Makefile | 40 ++++++++++++++++++++++++ benchmarks/nuttcp/distinfo | 2 ++ benchmarks/nuttcp/patches/patch-nuttcp_c | 29 +++++++++++++++++ benchmarks/nuttcp/pkg/DESCR | 10 ++++++ benchmarks/nuttcp/pkg/PLIST | 6 ++++ 5 files changed, 87 insertions(+) create mode 100644 benchmarks/nuttcp/Makefile create mode 100644 benchmarks/nuttcp/distinfo create mode 100644 benchmarks/nuttcp/patches/patch-nuttcp_c create mode 100644 benchmarks/nuttcp/pkg/DESCR create mode 100644 benchmarks/nuttcp/pkg/PLIST diff --git a/benchmarks/nuttcp/Makefile b/benchmarks/nuttcp/Makefile new file mode 100644 index 00000000000..caff1b2d739 --- /dev/null +++ b/benchmarks/nuttcp/Makefile @@ -0,0 +1,40 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2020/05/18 13:38:42 bluhm Exp $ + +COMMENT = network performance measurement tool + +DISTNAME = nuttcp-8.2.2 + +CATEGORIES = benchmarks + +HOMEPAGE = https://www.nuttcp.net/ + +MAINTAINER = Alexander Bluhm + +# GPLv2 +PERMIT_PACKAGE = Yes + +WANTLIB = c + +MASTER_SITES = https://nuttcp.net/nuttcp/ + +EXTRACT_SUFX = .tar.bz2 + +SEPARATE_BUILD = Yes + +NO_TEST = Yes + +# get rid of 12 MB unneeded crap +post-extract: + rm -rf -- ${WRKDIST}/cygwin/ + +do-build: + cd ${WRKBUILD} && ${CC} ${CFLAGS} ${WRKSRC}/nuttcp.c -o nuttcp + +do-install: + ${INSTALL_PROGRAM} ${WRKBUILD}/nuttcp ${PREFIX}/bin/ + ${INSTALL_MAN} ${WRKDIST}/nuttcp.8 ${PREFIX}/man/man8/ + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/nuttcp/ + ${INSTALL_DATA} ${WRKDIST}/README ${PREFIX}/share/doc/nuttcp/ + ${INSTALL_DATA} ${WRKDIST}/examples.txt ${PREFIX}/share/doc/nuttcp/ + +.include diff --git a/benchmarks/nuttcp/distinfo b/benchmarks/nuttcp/distinfo new file mode 100644 index 00000000000..7ff3b906a4a --- /dev/null +++ b/benchmarks/nuttcp/distinfo @@ -0,0 +1,2 @@ +SHA256 (nuttcp-8.2.2.tar.bz2) = fq16ieeqoFnSDjQELFihmMKYHK1ylVDROI3fyQNtOYM= +SIZE (nuttcp-8.2.2.tar.bz2) = 13070850 diff --git a/benchmarks/nuttcp/patches/patch-nuttcp_c b/benchmarks/nuttcp/patches/patch-nuttcp_c new file mode 100644 index 00000000000..293d9c26e6e --- /dev/null +++ b/benchmarks/nuttcp/patches/patch-nuttcp_c @@ -0,0 +1,29 @@ +$OpenBSD: patch-nuttcp_c,v 1.1.1.1 2020/05/18 13:38:42 bluhm Exp $ + +time_t is long long + +Index: nuttcp.c +--- nuttcp.c.orig ++++ nuttcp.c +@@ -9693,18 +9693,18 @@ prusage( register struct rusage *r0, register struct r + break; + + case 'X': +- sprintf(outp, "%ld", t == 0 ? 0 : (r1->ru_ixrss-r0->ru_ixrss)/t); ++ sprintf(outp, "%lld", t == 0 ? 0 : (r1->ru_ixrss-r0->ru_ixrss)/t); + END(outp); + break; + + case 'D': +- sprintf(outp, "%ld", t == 0 ? 0 : ++ sprintf(outp, "%lld", t == 0 ? 0 : + (r1->ru_idrss+r1->ru_isrss-(r0->ru_idrss+r0->ru_isrss))/t); + END(outp); + break; + + case 'K': +- sprintf(outp, "%ld", t == 0 ? 0 : ++ sprintf(outp, "%lld", t == 0 ? 0 : + ((r1->ru_ixrss+r1->ru_isrss+r1->ru_idrss) - + (r0->ru_ixrss+r0->ru_idrss+r0->ru_isrss))/t); + END(outp); diff --git a/benchmarks/nuttcp/pkg/DESCR b/benchmarks/nuttcp/pkg/DESCR new file mode 100644 index 00000000000..97d69c4ced5 --- /dev/null +++ b/benchmarks/nuttcp/pkg/DESCR @@ -0,0 +1,10 @@ +nuttcp is a network performance measurement tool intended for use +by network and system managers. Its most basic usage is to determine +the raw TCP (or UDP) network layer throughput by transferring memory +buffers from a source system across an interconnecting network to +a destination system, either transferring data for a specified time +interval, or alternatively transferring a specified number of bytes. +In addition to reporting the achieved network throughput in Mbps, +nuttcp also provides additional useful information related to the +data transfer such as user, system, and wall-clock time, transmitter +and receiver CPU utilization, and loss percentage (for UDP transfers). diff --git a/benchmarks/nuttcp/pkg/PLIST b/benchmarks/nuttcp/pkg/PLIST new file mode 100644 index 00000000000..eb706060361 --- /dev/null +++ b/benchmarks/nuttcp/pkg/PLIST @@ -0,0 +1,6 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2020/05/18 13:38:42 bluhm Exp $ +@bin bin/nuttcp +@man man/man8/nuttcp.8 +share/doc/nuttcp/ +share/doc/nuttcp/README +share/doc/nuttcp/examples.txt