summaryrefslogtreecommitdiff
path: root/benchmarks/fib
diff options
context:
space:
mode:
authorgarbled <garbled>1998-10-22 05:55:46 +0000
committergarbled <garbled>1998-10-22 05:55:46 +0000
commit09f4957ea3f70b6115b7fe8ff2237869847e84d2 (patch)
tree1bac6431b0000325ec886386d4665617f9d221d5 /benchmarks/fib
parentfc9add669bf976bfff504534ef6a3ade2dfac20d (diff)
downloadpkgsrc-09f4957ea3f70b6115b7fe8ff2237869847e84d2.tar.gz
Benchmark to time the computation of the 40th Fibonacci number.
Diffstat (limited to 'benchmarks/fib')
-rw-r--r--benchmarks/fib/Makefile26
-rw-r--r--benchmarks/fib/files/md53
-rw-r--r--benchmarks/fib/pkg/COMMENT1
-rw-r--r--benchmarks/fib/pkg/DESCR2
-rw-r--r--benchmarks/fib/pkg/PLIST2
5 files changed, 34 insertions, 0 deletions
diff --git a/benchmarks/fib/Makefile b/benchmarks/fib/Makefile
new file mode 100644
index 00000000000..06c97aa0251
--- /dev/null
+++ b/benchmarks/fib/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1.1.1 1998/10/22 05:55:46 garbled Exp $
+
+DISTNAME= fib.c
+PKGNAME= fib-980203
+CATEGORIES= benchmarks
+MASTER_SITES= ftp://ftp.nosc.mil/pub/aburto/fib/
+EXTRACT_SUFX= #empty
+
+MAINTAINER= root@garbled.net
+
+NO_WRKSUBDIR= yes
+
+do-extract:
+ ${MKDIR} ${WRKSRC}
+ ${CP} ${DISTDIR}/fib.c ${WRKSRC}/fib.c
+
+do-build:
+ (cd ${WRKSRC} ; cc -O2 -DUNIX -o fib fib.c -lm)
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/fib ${PREFIX}/bin
+
+benchmark:
+ -@${WRKSRC}/fib
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/benchmarks/fib/files/md5 b/benchmarks/fib/files/md5
new file mode 100644
index 00000000000..c2f28ea2f1a
--- /dev/null
+++ b/benchmarks/fib/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 1998/10/22 05:55:46 garbled Exp $
+
+MD5 (fib.c) = 586c1d6068485b84d5b355af77bb61f7
diff --git a/benchmarks/fib/pkg/COMMENT b/benchmarks/fib/pkg/COMMENT
new file mode 100644
index 00000000000..fc4dd1e8e85
--- /dev/null
+++ b/benchmarks/fib/pkg/COMMENT
@@ -0,0 +1 @@
+a mathematical benchmark
diff --git a/benchmarks/fib/pkg/DESCR b/benchmarks/fib/pkg/DESCR
new file mode 100644
index 00000000000..ffce64a985a
--- /dev/null
+++ b/benchmarks/fib/pkg/DESCR
@@ -0,0 +1,2 @@
+This benchmark times how long it takes your computer to compute the
+fourtieth Fibonacci Number.
diff --git a/benchmarks/fib/pkg/PLIST b/benchmarks/fib/pkg/PLIST
new file mode 100644
index 00000000000..f2cef369dd9
--- /dev/null
+++ b/benchmarks/fib/pkg/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 1998/10/22 05:55:46 garbled Exp $
+bin/fib