aboutsummaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/Makefile1
-rw-r--r--benchmarks/interbench/Makefile37
-rw-r--r--benchmarks/interbench/distinfo2
-rw-r--r--benchmarks/interbench/files/patch-interbench.c65
-rw-r--r--benchmarks/interbench/pkg-descr11
5 files changed, 116 insertions, 0 deletions
diff --git a/benchmarks/Makefile b/benchmarks/Makefile
index 8b348db02464..c6e924d068ef 100644
--- a/benchmarks/Makefile
+++ b/benchmarks/Makefile
@@ -25,6 +25,7 @@
SUBDIR += hs-criterion
SUBDIR += httperf
SUBDIR += imb
+ SUBDIR += interbench
SUBDIR += iozone
SUBDIR += iozone21
SUBDIR += iperf
diff --git a/benchmarks/interbench/Makefile b/benchmarks/interbench/Makefile
new file mode 100644
index 000000000000..265e0503da4c
--- /dev/null
+++ b/benchmarks/interbench/Makefile
@@ -0,0 +1,37 @@
+# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= interbench
+DISTVERSION= 0.31
+CATEGORIES= benchmarks
+MASTER_SITES= http://ck.kolivas.org/apps/interbench/
+
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= Interactivity benchmark for Unix-like systems
+
+LICENSE= GPLv2
+
+USE_BZIP2= yes
+USE_GMAKE= yes
+ALL_TARGET= clean ${PORTNAME}
+MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}"
+
+PLIST_FILES= bin/${PORTNAME}
+PORTDOCS= readme readme.interactivity
+
+OPTIONS_DEFINE= DOCS
+
+.include <bsd.port.options.mk>
+
+.if ${OSVERSION} < 800000
+BROKEN= does not build, requires sqrtl(3)
+.endif
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
+.if ${PORT_OPTIONS:MDOCS}
+ @${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/benchmarks/interbench/distinfo b/benchmarks/interbench/distinfo
new file mode 100644
index 000000000000..7a605d18e552
--- /dev/null
+++ b/benchmarks/interbench/distinfo
@@ -0,0 +1,2 @@
+SHA256 (interbench-0.31.tar.bz2) = 89d438b28aef22d26e79812762a57a9f9344a8dd8826edebfe60dad48ee1c784
+SIZE (interbench-0.31.tar.bz2) = 86776
diff --git a/benchmarks/interbench/files/patch-interbench.c b/benchmarks/interbench/files/patch-interbench.c
new file mode 100644
index 000000000000..2e63ef27a5a3
--- /dev/null
+++ b/benchmarks/interbench/files/patch-interbench.c
@@ -0,0 +1,65 @@
+--- interbench.c.orig 2009-10-31 12:14:59.000000000 +0800
++++ interbench.c 2013-03-11 20:56:50.000000000 +0800
+@@ -43,6 +43,7 @@
+ #include <sys/time.h>
+ #include <sys/resource.h>
+ #include <sys/types.h>
++#include <sys/stat.h>
+ #include <sys/mman.h>
+ #include <sys/wait.h>
+ #include "interbench.h"
+@@ -210,7 +211,7 @@
+ {
+ struct sched_param sp;
+ memset(&sp, 0, sizeof(sp));
+- sp.sched_priority = 99;
++ sp.sched_priority = sched_get_priority_max(SCHED_FIFO);
+ if (sched_setscheduler(0, SCHED_FIFO, &sp) == -1) {
+ if (errno != EPERM)
+ terminal_error("sched_setscheduler");
+@@ -888,7 +889,7 @@
+ * accurate accounting remains SCHED_NORMAL;
+ */
+ if (th->dt != &th->benchmarks[NOT_BENCHING])
+- set_fifo(96);
++ set_fifo(sched_get_priority_max(SCHED_FIFO) - 1);
+ /* These values must be changed at the appropriate places or race */
+ tk->sleep_interval = tk->slept_interval = 0;
+ post_sem(&s->ready);
+@@ -1133,7 +1134,7 @@
+ FILE *meminfo;
+ char aux[256];
+
+- if(!(meminfo = fopen("/proc/meminfo", "r")))
++ if(!(meminfo = fopen("/compat/linux/proc/meminfo", "r")))
+ terminal_error("fopen");
+
+ ud.ram = ud.swap = 0;
+@@ -1293,7 +1294,8 @@
+ thi->dt = &thi->benchmarks[j];
+ initialise_thread_data(thi->dt);
+ if (ud.do_rt)
+- set_thread_fifo(thi->pthread, 95);
++ set_thread_fifo(thi->pthread,
++ sched_get_priority_max(SCHED_FIFO) - 1);
+
+ /* Tell main we're ready */
+ wakeup_with(b2m[1]);
+@@ -1344,7 +1346,7 @@
+ * We want to be higher priority than everything to signal them to
+ * stop and we lock our memory if we can as well
+ */
+- set_fifo(99);
++ set_fifo(sched_get_priority_max(SCHED_FIFO));
+ set_mlock();
+
+ /* Wakeup the load process */
+@@ -1652,7 +1654,7 @@
+ * To get as accurate a loop as possible we time it running
+ * SCHED_FIFO if we can
+ */
+- set_fifo(99);
++ set_fifo(sched_get_priority_max(SCHED_FIFO));
+ calibrate_loop();
+ set_normal();
+ } else
diff --git a/benchmarks/interbench/pkg-descr b/benchmarks/interbench/pkg-descr
new file mode 100644
index 000000000000..f34825d0d656
--- /dev/null
+++ b/benchmarks/interbench/pkg-descr
@@ -0,0 +1,11 @@
+This benchmark application is designed to benchmark interactivity in Unix,
+originally developed by Con Kolivas for Linux.
+
+It is designed to measure the effect of changes in operating system kernel
+design or system configuration changes such as CPU, I/O scheduler and file
+system changes and options. With careful benchmarking, different hardware
+can be compared.
+
+Requires linprocfs(5) to be mounted under /compat/linux/proc to run.
+
+WWW: http://users.on.net/~ckolivas/interbench/