summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorbsiegert <bsiegert@pkgsrc.org>2015-07-04 16:11:53 +0000
committerbsiegert <bsiegert@pkgsrc.org>2015-07-04 16:11:53 +0000
commitb23c19fb6bfc4b3c762821f69cba768f4897368e (patch)
treec8f7142404a47f1cb4b43774573e75da423d7d9b /benchmarks
parent11d611e79a6b281bc9200a9fb9a56df1f9a1e946 (diff)
downloadpkgsrc-b23c19fb6bfc4b3c762821f69cba768f4897368e.tar.gz
Use 1000-based units for line speeds. From Anders Magnusson in
PR pkg/22102, in 2003.
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/ttcp/Makefile4
-rw-r--r--benchmarks/ttcp/distinfo4
-rw-r--r--benchmarks/ttcp/patches/patch-ab43
3 files changed, 34 insertions, 17 deletions
diff --git a/benchmarks/ttcp/Makefile b/benchmarks/ttcp/Makefile
index ec5168e8ad8..ce935fa5cc3 100644
--- a/benchmarks/ttcp/Makefile
+++ b/benchmarks/ttcp/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.22 2014/10/09 14:06:00 wiz Exp $
+# $NetBSD: Makefile,v 1.23 2015/07/04 16:11:53 bsiegert Exp $
DISTNAME= ttcp
PKGNAME= ${DISTNAME}-1.12
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= benchmarks net
#MASTER_SITES= ftp://ftp.ptb.de/pub/benchmarks/
EXTRACT_SUFX= .tar.Z
diff --git a/benchmarks/ttcp/distinfo b/benchmarks/ttcp/distinfo
index c89eefe8e59..c236b007119 100644
--- a/benchmarks/ttcp/distinfo
+++ b/benchmarks/ttcp/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.12 2013/12/17 15:05:23 tron Exp $
+$NetBSD: distinfo,v 1.13 2015/07/04 16:11:53 bsiegert Exp $
SHA1 (ttcp.tar.Z) = 33a60af208eff3dc9ae745060f44b24c4e74aa7e
RMD160 (ttcp.tar.Z) = b5cb1a8efe0f716d25d58a4950f35bac47b17668
Size (ttcp.tar.Z) = 18163 bytes
SHA1 (patch-aa) = 96e3a9136bae4057682d2b3cfea2ec8c8bb21eaa
-SHA1 (patch-ab) = 265c19e05e22ce9fff7596b7b1efca0c07a7f4e0
+SHA1 (patch-ab) = 5d04ee46ae5bb015c8834e18fe2f2e301c5059b4
diff --git a/benchmarks/ttcp/patches/patch-ab b/benchmarks/ttcp/patches/patch-ab
index 0681aa14f06..719f62d555d 100644
--- a/benchmarks/ttcp/patches/patch-ab
+++ b/benchmarks/ttcp/patches/patch-ab
@@ -1,10 +1,10 @@
-$NetBSD: patch-ab,v 1.9 2013/12/17 15:05:23 tron Exp $
+$NetBSD: patch-ab,v 1.10 2015/07/04 16:11:53 bsiegert Exp $
Fix build.
--- ttcp.c.orig 1997-02-27 21:30:23.000000000 +0000
-+++ ttcp.c 2005-12-21 11:40:39.000000000 +0000
-@@ -44,17 +44,19 @@
++++ ttcp.c
+@@ -44,17 +44,19 @@ static char RCSid[] = "ttcp.c $Revision:
/* #define BSD41a */
/* #define SYSV */ /* required on SGI IRIX releases before 3.3 */
@@ -28,7 +28,7 @@ Fix build.
#if defined(SYSV)
#include <sys/times.h>
-@@ -71,7 +73,8 @@
+@@ -71,7 +73,8 @@ struct sockaddr_in sinme;
struct sockaddr_in sinhim;
struct sockaddr_in frominet;
@@ -38,7 +38,7 @@ Fix build.
int fd; /* fd of network socket */
int buflen = 8 * 1024; /* length of buffer */
-@@ -99,7 +102,6 @@
+@@ -99,7 +102,6 @@ char fmt = 'K'; /* output format: k =
int touchdata = 0; /* access data after reading */
struct hostent *addr;
@@ -46,7 +46,7 @@ Fix build.
extern int optind;
extern char *optarg;
-@@ -151,7 +153,7 @@
+@@ -151,7 +153,7 @@ main(argc,argv)
int argc;
char **argv;
{
@@ -55,7 +55,7 @@ Fix build.
int c;
if (argc < 2) goto usage;
-@@ -263,29 +265,30 @@
+@@ -263,29 +265,30 @@ char **argv;
if ( (buf = (char *)malloc(buflen+bufalign)) == (char *)NULL)
err("malloc");
if (bufalign != 0)
@@ -93,7 +93,7 @@ Fix build.
err("bind");
#if defined(SO_SNDBUF) || defined(SO_RCVBUF)
-@@ -326,7 +329,7 @@
+@@ -326,7 +329,7 @@ char **argv;
mes("nodelay");
}
#endif
@@ -102,7 +102,7 @@ Fix build.
err("connect");
mes("connect");
} else {
-@@ -348,11 +351,11 @@
+@@ -348,11 +351,11 @@ char **argv;
}
fromlen = sizeof(frominet);
domain = AF_INET;
@@ -117,7 +117,7 @@ Fix build.
&peerlen) < 0) {
err("getpeername");
}
-@@ -412,25 +415,25 @@
+@@ -412,25 +415,25 @@ char **argv;
}
if( cput <= 0.0 ) cput = 0.001;
if( realt <= 0.0 ) realt = 0.001;
@@ -148,7 +148,24 @@ Fix build.
"ttcp%s: buffer address %#x\n",
trans?"-t":"-r",
buf);
-@@ -749,10 +752,10 @@
+@@ -488,13 +491,13 @@ double b;
+ sprintf(obuf, "%.2f MB", b / 1024.0 / 1024.0);
+ break;
+ case 'g':
+- sprintf(obuf, "%.2f Gbit", b * 8.0 / 1024.0 / 1024.0 / 1024.0);
++ sprintf(obuf, "%.2f Gbit", b * 8.0 / 1000.0 / 1000.0 / 1000.0);
+ break;
+ case 'k':
+- sprintf(obuf, "%.2f Kbit", b * 8.0 / 1024.0);
++ sprintf(obuf, "%.2f Kbit", b * 8.0 / 1000.0);
+ break;
+ case 'm':
+- sprintf(obuf, "%.2f Mbit", b * 8.0 / 1024.0 / 1024.0);
++ sprintf(obuf, "%.2f Mbit", b * 8.0 / 1000.0 / 1000.0);
+ break;
+ }
+ return obuf;
+@@ -749,10 +752,10 @@ void *buf;
int count;
{
struct sockaddr_in from;
@@ -161,7 +178,7 @@ Fix build.
numCalls++;
} else {
if( b_flag )
-@@ -782,7 +785,7 @@
+@@ -782,7 +785,7 @@ int count;
register int cnt;
if( udp ) {
again:
@@ -170,7 +187,7 @@ Fix build.
numCalls++;
if( cnt<0 && errno == ENOBUFS ) {
delay(18000);
-@@ -803,7 +806,7 @@
+@@ -803,7 +806,7 @@ delay(us)
tv.tv_sec = 0;
tv.tv_usec = us;