mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
New port benchmarks/dhrystone : a computing benchmark for integer operations
PR: 193153 Submitted by: Radim Kolar <hsn@sendmail.cz>
This commit is contained in:
parent
bef5158bb7
commit
a9e4ed6487
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=377022
@ -10,6 +10,7 @@
|
||||
SUBDIR += cpipe
|
||||
SUBDIR += dbench
|
||||
SUBDIR += dbs
|
||||
SUBDIR += dhrystone
|
||||
SUBDIR += dkftpbench
|
||||
SUBDIR += expedite
|
||||
SUBDIR += fhourstones
|
||||
|
43
benchmarks/dhrystone/Makefile
Normal file
43
benchmarks/dhrystone/Makefile
Normal file
@ -0,0 +1,43 @@
|
||||
# Created by: Radim Kolar <hsn@sendmail.cz>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= dhrystone
|
||||
PORTVERSION= 2.1
|
||||
CATEGORIES= benchmarks
|
||||
MASTER_SITES= ${MASTER_SITE_NETLIB}
|
||||
MASTER_SITE_SUBDIR=benchmark
|
||||
DISTNAME= dhry-c
|
||||
EXTRACT_SUFX=
|
||||
|
||||
MAINTAINER= hsn@sendmail.cz
|
||||
COMMENT= Computing benchmark for integer operations
|
||||
|
||||
LICENSE= BSD2CLAUSE
|
||||
|
||||
EXTRACT_CMD= ${MKDIR} ${WRKSRC};cd ${WRKSRC} && ${SH}
|
||||
|
||||
PLIST_FILES= bin/dhry
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
PORTDOCS= RATIONALE submit.frm README_C VARIATIONS
|
||||
.endif
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && ${CC} ${CFLAGS} -c dhry_1.c && \
|
||||
${CC} ${CFLAGS} -c dhry_2.c && \
|
||||
${CC} -o dhry *.o
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/dhry ${STAGEDIR}${PREFIX}/bin
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
.for f in ${PORTDOCS}
|
||||
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
2
benchmarks/dhrystone/distinfo
Normal file
2
benchmarks/dhrystone/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (dhry-c) = 038a7e9169787125c3451a6c941f3aca5db2d2f3863871afcdce154ef17f4e3e
|
||||
SIZE (dhry-c) = 72812
|
24
benchmarks/dhrystone/files/patch-hz
Normal file
24
benchmarks/dhrystone/files/patch-hz
Normal file
@ -0,0 +1,24 @@
|
||||
diff -Naur drystone-2.1/dhry.h drystone-patched/dhry.h
|
||||
--- dhry.h 2014-08-30 16:32:37.000000000 +0200
|
||||
+++ dhry.h 2014-08-30 16:37:44.933675426 +0200
|
||||
@@ -385,6 +385,8 @@
|
||||
|
||||
#include <stdio.h>
|
||||
/* for strcpy, strcmp */
|
||||
+#include <unistd.h>
|
||||
+ /* for sysconf */
|
||||
|
||||
#define Null 0
|
||||
/* Value of a Null pointer */
|
||||
diff -Naur drystone-2.1/dhry_1.c drystone-patched/dhry_1.c
|
||||
--- dhry_1.c 2014-08-30 16:32:37.000000000 +0200
|
||||
+++ dhry_1.c 2014-08-30 16:44:20.484050144 +0200
|
||||
@@ -262,6 +262,8 @@
|
||||
/ (float) Number_Of_Runs;
|
||||
Dhrystones_Per_Second = (float) Number_Of_Runs / (float) User_Time;
|
||||
#else
|
||||
+
|
||||
+ int HZ = sysconf(_SC_CLK_TCK);
|
||||
Microseconds = (float) User_Time * Mic_secs_Per_Second
|
||||
/ ((float) HZ * ((float) Number_Of_Runs));
|
||||
Dhrystones_Per_Second = ((float) HZ * (float) Number_Of_Runs)
|
33
benchmarks/dhrystone/files/patch-includes
Normal file
33
benchmarks/dhrystone/files/patch-includes
Normal file
@ -0,0 +1,33 @@
|
||||
diff -Naur drystone-patched/dhry.h dhrystone-working/dhry.h
|
||||
--- dhry.h 2014-08-30 16:37:44.933675426 +0200
|
||||
+++ dhry.h 2014-08-30 17:22:14.124345711 +0200
|
||||
@@ -384,7 +384,10 @@
|
||||
/* General definitions: */
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
/* for strcpy, strcmp */
|
||||
+#include <stdlib.h>
|
||||
+ /* for malloc */
|
||||
#include <unistd.h>
|
||||
/* for sysconf */
|
||||
|
||||
diff -Naur drystone-patched/dhry_1.c dhrystone-working/dhry_1.c
|
||||
--- dhry_1.c 2014-08-30 16:44:20.484050144 +0200
|
||||
+++ dhry_1.c 2014-08-30 17:12:06.705379492 +0200
|
||||
@@ -28,7 +28,6 @@
|
||||
int Arr_1_Glob [50];
|
||||
int Arr_2_Glob [50] [50];
|
||||
|
||||
-extern char *malloc ();
|
||||
Enumeration Func_1 ();
|
||||
/* forward declaration necessary since Enumeration may not simply be int */
|
||||
|
||||
@@ -45,7 +44,6 @@
|
||||
|
||||
#ifdef TIMES
|
||||
struct tms time_info;
|
||||
-extern int times ();
|
||||
/* see library function "times" */
|
||||
#define Too_Small_Time 120
|
||||
/* Measurements should last at least about 2 seconds */
|
12
benchmarks/dhrystone/pkg-descr
Normal file
12
benchmarks/dhrystone/pkg-descr
Normal file
@ -0,0 +1,12 @@
|
||||
Dhrystone benchmark
|
||||
|
||||
Dhrystone is a synthetic computing benchmark program developed in 1984
|
||||
by Reinhold P. Weicker intended to be representative of system (integer)
|
||||
programming. The Dhrystone grew to become representative of general
|
||||
processor (CPU) performance.
|
||||
|
||||
DMIPS value is result of dhrystone test divided by 1757, results are often
|
||||
reported in DMIPS/Mhz. For more information, see
|
||||
http://en.wikipedia.org/wiki/Dhrystone
|
||||
|
||||
WWW: http://www.netlib.org/benchmark/
|
Loading…
Reference in New Issue
Block a user