pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/benchmarks/bytebench 4.1.0nb1: Interix has no sync(2)....



details:   https://anonhg.NetBSD.org/pkgsrc/rev/45dfbd06ab94
branches:  trunk
changeset: 501929:45dfbd06ab94
user:      tv <tv%pkgsrc.org@localhost>
date:      Mon Oct 31 17:09:45 2005 +0000

description:
4.1.0nb1: Interix has no sync(2).  Use fsync(2) there instead.

While there, use fsync(2) on all hosts.  Without this, the fstime benchmark
will be disproportionately biased toward OS's and hardware that buffer
larger amounts of data in memory before [background] syncing.

diffstat:

 benchmarks/bytebench/Makefile         |   5 ++-
 benchmarks/bytebench/distinfo         |   3 +-
 benchmarks/bytebench/patches/patch-ag |  50 +++++++++++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 3 deletions(-)

diffs (82 lines):

diff -r 970964913185 -r 45dfbd06ab94 benchmarks/bytebench/Makefile
--- a/benchmarks/bytebench/Makefile     Mon Oct 31 17:03:02 2005 +0000
+++ b/benchmarks/bytebench/Makefile     Mon Oct 31 17:09:45 2005 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.15 2004/07/30 15:50:37 minskim Exp $
+# $NetBSD: Makefile,v 1.16 2005/10/31 17:09:45 tv Exp $
 
 DISTNAME=              unixbench-4.1.0
-PKGNAME=               bytebench-4.1.0
+PKGNAME=               ${DISTNAME:S/unix/byte/}
+PKGREVISION=           1
 CATEGORIES=            benchmarks
 MASTER_SITES=          http://www.tux.org/pub/tux/benchmarks/System/unixbench/
 EXTRACT_SUFX=          .tgz
diff -r 970964913185 -r 45dfbd06ab94 benchmarks/bytebench/distinfo
--- a/benchmarks/bytebench/distinfo     Mon Oct 31 17:03:02 2005 +0000
+++ b/benchmarks/bytebench/distinfo     Mon Oct 31 17:09:45 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2005/10/13 03:31:06 ben Exp $
+$NetBSD: distinfo,v 1.9 2005/10/31 17:09:45 tv Exp $
 
 SHA1 (unixbench-4.1.0.tgz) = 0a43d9cf08869c0f81bde4647be6bcf76c064248
 RMD160 (unixbench-4.1.0.tgz) = 182e8a35574df0cd7984662bf99d47a7e24e7e03
@@ -9,3 +9,4 @@
 SHA1 (patch-ad) = 3a1b788d9fa51fc168d59d8c87b1f476df2d5f41
 SHA1 (patch-ae) = fbbce3deed7f0421034c1d57b66b1967ad8bddf1
 SHA1 (patch-af) = 725a82ecb5f15ec47dda39d53a16027a0e4a7efd
+SHA1 (patch-ag) = 03916e56921f05ebfde2cb3c9944d528117c11c6
diff -r 970964913185 -r 45dfbd06ab94 benchmarks/bytebench/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/benchmarks/bytebench/patches/patch-ag     Mon Oct 31 17:09:45 2005 +0000
@@ -0,0 +1,50 @@
+$NetBSD: patch-ag,v 1.1 2005/10/31 17:09:45 tv Exp $
+
+--- src/fstime.c.orig  1999-07-28 17:47:02.000000000 -0400
++++ src/fstime.c
+@@ -151,11 +151,13 @@ int w_test(void)
+       long f_blocks;
+       extern int sigalarm;
+ 
++#ifndef __INTERIX
+       /* Sync and let it settle */
+       sync();
+       sleep(2);
+       sync();
+       sleep(1);
++#endif
+ 
+       signal(SIGALRM,stop_count);
+       sigalarm = 0; /* reset alarm flag */
+@@ -176,6 +178,8 @@ int w_test(void)
+               lseek(f, 0L, 0); /* rewind */
+       }
+ 
++      fsync(f);
++
+       /* stop clock */
+       fprintf(stderr, "%d second sample\n", seconds);
+       write_score = counted/((long)seconds * COUNTPERK);
+@@ -194,11 +198,13 @@ int r_test(void)
+       extern int sigalarm;
+       extern int errno;
+ 
++#ifndef __INTERIX
+       /* Sync and let it settle */
+       sync();
+       sleep(2 + seconds/4);
+       sync();
+       sleep(1 + seconds/4);
++#endif
+ 
+       /* rewind */
+       errno = 0;
+@@ -229,6 +235,8 @@ int r_test(void)
+                       counted += COUNTPERBUF;
+       }
+ 
++      fsync(f);
++
+       /* stop clock */
+       fprintf(stderr, "%d second sample\n", seconds);
+       read_score = counted / ((long)seconds * COUNTPERK);



Home | Main Index | Thread Index | Old Index