aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks
diff options
context:
space:
mode:
authorpgj <pgj@FreeBSD.org>2010-01-13 05:53:30 +0800
committerpgj <pgj@FreeBSD.org>2010-01-13 05:53:30 +0800
commitae24224a33625add80248fe74f0ca7911b7de2b5 (patch)
treec8e0ae854360ac3b6e6240b45ff39df5aea53b8d /benchmarks
parent6ce68d7aa96eb3af3a8b3bcb9ab3052d9ece0aa3 (diff)
downloadfreebsd-ports-gnome-ae24224a33625add80248fe74f0ca7911b7de2b5.tar.gz
freebsd-ports-gnome-ae24224a33625add80248fe74f0ca7911b7de2b5.tar.zst
freebsd-ports-gnome-ae24224a33625add80248fe74f0ca7911b7de2b5.zip
This Haskell library provides a powerful but simple way to measure the
performance of Haskell code. It provides both a framework for executing and analysing benchmarks and a set of driver functions that makes it easy to build and run benchmarks, and to analyse their results. WWW: http://hackage.haskell.org/package/criterion PR: ports/142495 Submitted by: Jacula Modyun <jacula(at)gmail.com>
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/Makefile1
-rw-r--r--benchmarks/hs-criterion/Makefile95
-rw-r--r--benchmarks/hs-criterion/distinfo3
-rw-r--r--benchmarks/hs-criterion/pkg-descr9
-rw-r--r--benchmarks/hs-criterion/pkg-plist24
5 files changed, 132 insertions, 0 deletions
diff --git a/benchmarks/Makefile b/benchmarks/Makefile
index 5c757363e693..52a8a6ab2e51 100644
--- a/benchmarks/Makefile
+++ b/benchmarks/Makefile
@@ -18,6 +18,7 @@
SUBDIR += gtkperf
SUBDIR += himenobench
SUBDIR += hpl
+ SUBDIR += hs-criterion
SUBDIR += httperf
SUBDIR += imb
SUBDIR += iozone
diff --git a/benchmarks/hs-criterion/Makefile b/benchmarks/hs-criterion/Makefile
new file mode 100644
index 000000000000..48b2d0a890ba
--- /dev/null
+++ b/benchmarks/hs-criterion/Makefile
@@ -0,0 +1,95 @@
+# New ports collection makefile for: hs-criterion
+# Date created: December 20 2009
+# Whom: Giuseppe Pilichi aka Jacula Modyun <jacula@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= criterion
+PORTVERSION= 0.4.1.0
+CATEGORIES= benchmarks haskell
+MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
+PKGNAMEPREFIX= hs-
+
+MAINTAINER= jacula@gmail.com
+COMMENT= Robust, reliable performance measurement and analysis for Haskell
+
+BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc \
+ hs-deepseq>=1.1.0.0:${PORTSDIR}/devel/hs-deepseq \
+ hs-statistics>=0.3.5:${PORTSDIR}/math/hs-statistics \
+ hs-uvector>=0.1.0.5:${PORTSDIR}/devel/hs-uvector \
+ hs-uvector-algorithms>=0.2:${PORTSDIR}/devel/hs-uvector-algorithms
+RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc \
+ hs-deepseq>=1.1.0.0:${PORTSDIR}/devel/hs-deepseq \
+ hs-statistics>=0.3.5:${PORTSDIR}/math/hs-statistics \
+ hs-uvector>=0.1.0.5:${PORTSDIR}/devel/hs-uvector \
+ hs-uvector-algorithms>=0.2:${PORTSDIR}/devel/hs-uvector-algorithms
+
+GHC_VERSION= 6.10.4
+CRITERION_VERSION= ${PORTVERSION}
+
+GHC_CMD= ${LOCALBASE}/bin/ghc
+SETUP_CMD= ./setup
+
+EXAMPLESDIR= ${PREFIX}/share/examples/${DISTNAME}
+PORTEXAMPLES= *
+
+DATADIR= ${PREFIX}/share/${DISTNAME}
+PORTDATA= *
+
+DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
+CRITERION_LIBDIR_REL= lib/${DISTNAME}
+
+PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
+ CRITERION_VERSION=${CRITERION_VERSION} \
+ CRITERION_LIBDIR_REL=${CRITERION_LIBDIR_REL}
+
+.if defined(NOPORTDOCS)
+PLIST_SUB+= NOPORTDOCS=""
+.else
+PLIST_SUB+= NOPORTDOCS="@comment "
+.endif
+
+.if !defined(NOPORTDOCS)
+
+PORT_HADDOCK!= (cd ${.CURDIR}/../../lang/ghc && ${MAKE} -V PORT_HADDOCK)
+.if !empty(PORT_HADDOCK:M?0)
+BUILD_DEPENDS+= haddock:${PORTSDIR}/devel/hs-haddock
+.endif
+BUILD_DEPENDS+= HsColour:${PORTSDIR}/print/hs-hscolour
+
+HSCOLOUR_VERSION= 1.15
+HSCOLOUR_DATADIR= ${PREFIX}/share/hscolour-${HSCOLOUR_VERSION}
+
+PORTDOCS= *
+.endif
+
+.SILENT:
+
+do-configure:
+ cd ${WRKSRC} && ${GHC_CMD} --make Setup.hs -o setup -package Cabal \
+ && ${SETUP_CMD} configure --haddock-options=-w --prefix=${PREFIX}
+
+do-build:
+ cd ${WRKSRC} && ${SETUP_CMD} build \
+ && ${SETUP_CMD} register --gen-script
+
+.if !defined(NOPORTDOCS)
+ cd ${WRKSRC} && ${SETUP_CMD} haddock --hyperlink-source \
+ --hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css
+.endif
+
+do-install:
+ cd ${WRKSRC} && ${SETUP_CMD} install \
+ && ${INSTALL_SCRIPT} register.sh ${PREFIX}/${CRITERION_LIBDIR_REL}/register.sh
+.if !defined(NOPORTDATA)
+ ${MKDIR} ${DATADIR} && ${INSTALL_DATA} ${WRKSRC}/README ${DATADIR}
+.endif
+.if !defined(NOPORTEXAMPLES)
+ ${MKDIR} ${EXAMPLESDIR} && cd ${WRKSRC}/examples && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}
+.endif
+
+post-install:
+ ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
+
+.include <bsd.port.mk>
diff --git a/benchmarks/hs-criterion/distinfo b/benchmarks/hs-criterion/distinfo
new file mode 100644
index 000000000000..bc8fe9222e34
--- /dev/null
+++ b/benchmarks/hs-criterion/distinfo
@@ -0,0 +1,3 @@
+MD5 (criterion-0.4.1.0.tar.gz) = 55f90d0fff67dff305fde7fa684fab54
+SHA256 (criterion-0.4.1.0.tar.gz) = 2bebfd3c8bfd7eeb3cc30ff23c6be067cf1dc9af11a1edda92f3fbe967b3dcf6
+SIZE (criterion-0.4.1.0.tar.gz) = 17529
diff --git a/benchmarks/hs-criterion/pkg-descr b/benchmarks/hs-criterion/pkg-descr
new file mode 100644
index 000000000000..d6eb9071f809
--- /dev/null
+++ b/benchmarks/hs-criterion/pkg-descr
@@ -0,0 +1,9 @@
+This Haskell library provides a powerful but simple way to measure the
+performance of Haskell code. It provides both a framework for executing
+and analysing benchmarks and a set of driver functions that makes it
+easy to build and run benchmarks, and to analyse their results.
+
+The fastest way to get started is to read the documentation and
+examples in the Criterion.Main module.
+
+WWW: http://hackage.haskell.org/package/criterion
diff --git a/benchmarks/hs-criterion/pkg-plist b/benchmarks/hs-criterion/pkg-plist
new file mode 100644
index 000000000000..da96dde591c5
--- /dev/null
+++ b/benchmarks/hs-criterion/pkg-plist
@@ -0,0 +1,24 @@
+@comment $FreeBSD$
+%%CRITERION_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Criterion.hi
+%%CRITERION_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Criterion/Analysis.hi
+%%CRITERION_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Criterion/Config.hi
+%%CRITERION_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Criterion/Environment.hi
+%%CRITERION_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Criterion/IO.hi
+%%CRITERION_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Criterion/Main.hi
+%%CRITERION_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Criterion/Measurement.hi
+%%CRITERION_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Criterion/Monad.hi
+%%CRITERION_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Criterion/MultiMap.hi
+%%CRITERION_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Criterion/Plot.hi
+%%CRITERION_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Criterion/Types.hi
+%%CRITERION_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HScriterion-%%CRITERION_VERSION%%.o
+%%CRITERION_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHScriterion-%%CRITERION_VERSION%%.a
+%%CRITERION_LIBDIR_REL%%/register.sh
+%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
+%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
+@dirrm %%CRITERION_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Criterion
+@dirrm %%CRITERION_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
+@dirrm %%CRITERION_LIBDIR_REL%%
+@exec /bin/sh %D/%%CRITERION_LIBDIR_REL%%/register.sh
+@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+@unexec %D/bin/ghc-pkg unregister criterion
+@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old