mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
benchmarks/unixbench: Update to the latest commit
Graphics always enabled Reported by: Nilton Jose Rizzo <niltonrizzo@gmail.com>
This commit is contained in:
parent
1543e38e48
commit
48ccde43d5
9 changed files with 112 additions and 105 deletions
|
@ -1,7 +1,7 @@
|
|||
PORTNAME= unixbench
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 5.1.3
|
||||
PORTREVISION= 2
|
||||
DISTVERSION= 5.1.3-51
|
||||
DISTVERSIONSUFFIX= -g6705203
|
||||
CATEGORIES= benchmarks
|
||||
|
||||
MAINTAINER= pizzamig@FreeBSD.org
|
||||
|
@ -12,11 +12,15 @@ LICENSE= GPLv2
|
|||
|
||||
RUN_DEPENDS= x11perf:x11/x11perf
|
||||
|
||||
USES= gmake perl5 shebangfix
|
||||
USES= gmake gl perl5 shebangfix xorg
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= kdlucas
|
||||
GH_PROJECT= byte-unixbench
|
||||
WRKSRC_SUBDIR= UnixBench
|
||||
USE_GL= gl
|
||||
USE_XORG= x11 xext
|
||||
CFLAGS+= -I${LOCALBASE}/include \
|
||||
-L${LOCALBASE}/lib
|
||||
|
||||
SUB_FILES= unixbench
|
||||
SHEBANG_FILES= Run pgms/gfx-x11
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1503481858
|
||||
SHA256 (kdlucas-byte-unixbench-v5.1.3_GH0.tar.gz) = 3a6bb00f270a5329682dff20fd2c1ab5332ef046eb54a96a0d7bd371005d31a3
|
||||
SIZE (kdlucas-byte-unixbench-v5.1.3_GH0.tar.gz) = 145908
|
||||
TIMESTAMP = 1675975375
|
||||
SHA256 (kdlucas-byte-unixbench-v5.1.3-51-g6705203_GH0.tar.gz) = d94e504f6aac71ada43a3f0a92b7b29fe004da50eb0d40dacc065e4dbfa1f5df
|
||||
SIZE (kdlucas-byte-unixbench-v5.1.3-51-g6705203_GH0.tar.gz) = 155193
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
--- Makefile.orig 2015-06-04 17:20:18 UTC
|
||||
+++ Makefile
|
||||
@@ -38,7 +38,7 @@
|
||||
##############################################################################
|
||||
--- Makefile.orig 2023-02-07 23:18:07.000000000 +0100
|
||||
+++ Makefile 2023-02-09 21:57:42.966634000 +0100
|
||||
@@ -46,7 +46,7 @@
|
||||
# X11 libraries on your system. (e.g. libX11-devel mesa-libGL-devel)
|
||||
#
|
||||
# Comment the line out to disable these tests.
|
||||
-# GRAPHIC_TESTS = defined
|
||||
+GRAPHIC_TESTS = defined
|
||||
|
||||
SHELL = /bin/sh
|
||||
-
|
||||
+HZ = 128
|
||||
# GRAPHICS TESTS: Uncomment the definition of "GRAPHIC_TESTS" to enable
|
||||
# the building of the graphics benchmarks. This will require the
|
||||
# X11 libraries on your system.
|
||||
@@ -53,7 +53,7 @@ GL_LIBS = -lGL -lXext -lX11
|
||||
# Set "GL_LIBS" to the libraries needed to link a GL program.
|
||||
GL_LIBS = -lGL -lXext -lX11
|
||||
@@ -55,7 +55,7 @@
|
||||
# COMPILER CONFIGURATION: Set "CC" to the name of the compiler to use
|
||||
# to build the binary benchmarks. You should also set "$cCompiler" in the
|
||||
# Run script to the name of the compiler you want to test.
|
||||
|
@ -17,30 +17,23 @@
|
|||
+#CC=gcc
|
||||
|
||||
# OPTIMISATION SETTINGS:
|
||||
# Use gcc option if defined UB_GCC_OPTIONS via "Environment variable" or "Command-line arguments".
|
||||
@@ -87,7 +87,7 @@
|
||||
## (-ffast-math) disables strict IEEE or ISO rules/specifications for math funcs
|
||||
OPTON = -O3 -ffast-math
|
||||
|
||||
@@ -71,14 +71,14 @@ CC=gcc
|
||||
# -m386 -malign-loops=1 -malign-jumps=1 -malign-functions=1
|
||||
- ## OS detection. Comment out if gmake syntax not supported by other 'make'.
|
||||
+ ## OS detection. Comment out if gmake syntax not supported by other 'make'.
|
||||
OSNAME:=$(shell uname -s)
|
||||
ARCH := $(shell uname -p)
|
||||
ifeq ($(OSNAME),Linux)
|
||||
@@ -113,6 +113,9 @@
|
||||
CFLAGS += -Wa,-q
|
||||
endif
|
||||
|
||||
## For Solaris 2, or general-purpose GCC 2.7.x
|
||||
-OPTON = -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall
|
||||
+OPTON = -O2 -fomit-frame-pointer -ffast-math -Wall
|
||||
|
||||
## For Digital Unix v4.x, with DEC cc v5.x
|
||||
#OPTON = -O4
|
||||
#CFLAGS = -DTIME -std1 -verbose -w0
|
||||
|
||||
## generic gcc CFLAGS. -DTIME must be included.
|
||||
-CFLAGS = -DTIME -Wall -pedantic -ansi
|
||||
+CFLAGS += -DTIME -Wall -pedantic -ansi
|
||||
+ ifeq ($(OSNAME),FreeBSD)
|
||||
+ OPTON += -march=native -mtune=native -fomit-frame-pointer
|
||||
+ endif
|
||||
endif
|
||||
|
||||
|
||||
##############################################################################
|
||||
@@ -90,8 +90,6 @@ CFLAGS = -DTIME -Wall -pedantic -ansi
|
||||
PROGDIR = ./pgms
|
||||
SRCDIR = ./src
|
||||
TESTDIR = ./testdir
|
||||
-RESULTDIR = ./results
|
||||
-TMPDIR = ./tmp
|
||||
# other directories
|
||||
INCLDIR = /usr/include
|
||||
LIBDIR = /lib
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
--- Run.orig 2020-06-11 08:18:10 UTC
|
||||
+++ Run
|
||||
@@ -91,10 +91,10 @@ chomp($BASEDIR);
|
||||
my $BINDIR = getDir('UB_BINDIR', $BASEDIR . "/pgms");
|
||||
--- Run.orig 2023-02-09 22:21:08.690117000 +0100
|
||||
+++ Run 2023-02-09 22:20:31.633214000 +0100
|
||||
@@ -91,10 +91,10 @@
|
||||
my $BINDIR = getDir('UB_BINDIR', $FindBin::Bin . "/pgms");
|
||||
|
||||
# Temp directory, for temp files.
|
||||
-my $TMPDIR = getDir('UB_TMPDIR', $BASEDIR . "/tmp");
|
||||
-my $TMPDIR = getDir('UB_TMPDIR', $FindBin::Bin . "/tmp");
|
||||
+my $TMPDIR = "/tmp";
|
||||
|
||||
# Directory to put results in.
|
||||
-my $RESULTDIR = getDir('UB_RESULTDIR', $BASEDIR . "/results");
|
||||
-my $RESULTDIR = getDir('UB_RESULTDIR', $FindBin::Bin . "/results");
|
||||
+my $RESULTDIR = "/tmp";
|
||||
|
||||
# Directory where the tests are executed.
|
||||
my $TESTDIR = getDir('UB_TESTDIR', $BASEDIR . "/testdir");
|
||||
@@ -672,6 +672,18 @@ sub processCpuFlags {
|
||||
# these fields:
|
||||
# describing the model etc. Returns undef if the information can't be got.
|
||||
my $TESTDIR = getDir('UB_TESTDIR', $FindBin::Bin . "/testdir");
|
||||
@@ -698,6 +698,18 @@
|
||||
# future: on systems without /proc/cpuinfo, might check for Perl modules:
|
||||
# Sys::Info::Device::CPU or Sys::CpuAffinity
|
||||
sub getCpuInfo {
|
||||
+ my $ncpu = getCmdOutput("sysctl -n hw.ncpu");
|
||||
+ my $cpus = [ ];
|
||||
|
@ -29,17 +29,20 @@
|
|||
+}
|
||||
+
|
||||
+sub getCpuInfoBak {
|
||||
if (!("$^O" eq "darwin")) {
|
||||
open(my $fd, "<", "/proc/cpuinfo") || return undef;
|
||||
|
||||
my $cpus = [ ];
|
||||
@@ -735,12 +747,10 @@ sub getSystemInfo {
|
||||
|
||||
@@ -815,15 +827,11 @@
|
||||
# Get the language info.
|
||||
my $lang = getCmdOutput("printenv LANG");
|
||||
- my $map = getCmdOutput("locale -k LC_CTYPE | grep charmap");
|
||||
+ my $map = getCmdOutput("locale -k | grep charmap");
|
||||
my $map = $^O ne "aix"
|
||||
- ? getCmdOutput("locale -k LC_CTYPE | grep charmap") || ""
|
||||
+ ? getCmdOutput("locale -k | grep charmap") || ""
|
||||
: getCmdOutput("locale charmap") || "";
|
||||
$map =~ s/.*=//;
|
||||
- my $coll = getCmdOutput("locale -k LC_COLLATE | grep collate-codeset");
|
||||
- my $coll = $^O ne "aix"
|
||||
- ? getCmdOutput("locale -k LC_COLLATE | grep collate-codeset") || ""
|
||||
- : getCmdOutput("locale | grep LC_COLLATE") || "";
|
||||
- $coll =~ s/.*=//;
|
||||
- $info->{'language'} = sprintf "%s (charmap=%s, collate=%s)",
|
||||
- $lang, $map, $coll;
|
||||
|
@ -48,7 +51,7 @@
|
|||
|
||||
# Get details on the CPUs, if possible.
|
||||
my $cpus = getCpuInfo();
|
||||
@@ -750,10 +760,9 @@ sub getSystemInfo {
|
||||
@@ -839,10 +847,9 @@
|
||||
}
|
||||
|
||||
# Get graphics hardware info.
|
||||
|
@ -56,11 +59,11 @@
|
|||
+ #$info->{'graphics'} = getCmdOutput("3dinfo | cut -f1 -d\'(\'");
|
||||
|
||||
# Get system run state, load and usage info.
|
||||
- $info->{'runlevel'} = getCmdOutput("runlevel | cut -f2 -d\" \"");
|
||||
- $info->{'runlevel'} = getCmdOutput("who -r | awk '{print \$3}'");
|
||||
$info->{'load'} = getCmdOutput("uptime");
|
||||
$info->{'numUsers'} = getCmdOutput("who | wc -l");
|
||||
|
||||
@@ -781,6 +790,7 @@ sub abortRun {
|
||||
@@ -870,6 +877,7 @@
|
||||
|
||||
# Do checks that everything's ready for testing.
|
||||
sub preChecks {
|
||||
|
@ -68,7 +71,7 @@
|
|||
# Set the language.
|
||||
$ENV{'LANG'} = $language;
|
||||
|
||||
@@ -1386,7 +1396,7 @@ sub displaySystem {
|
||||
@@ -1476,7 +1484,7 @@
|
||||
}
|
||||
|
||||
# Display system load and usage info.
|
||||
|
@ -77,7 +80,25 @@
|
|||
}
|
||||
|
||||
|
||||
@@ -1603,8 +1613,8 @@ sub displaySystemHtml {
|
||||
@@ -1587,7 +1595,7 @@
|
||||
|
||||
# Write CSV Headers.
|
||||
# e.g.: "Concurrency,Dhrystone 2 using register variables,Double-Precision Whetstone"
|
||||
-#
|
||||
+#
|
||||
sub summarizeRunCsvHeader {
|
||||
my ( $results, $reportFd ) = @_;
|
||||
|
||||
@@ -1612,7 +1620,7 @@
|
||||
|
||||
# Write concurrency value.
|
||||
printf $reportFd "%d", $results->{'copies'};
|
||||
-
|
||||
+
|
||||
# Write test results.
|
||||
my $isFirstColumn = 1;
|
||||
foreach my $bench (@{$results->{'list'}}) {
|
||||
@@ -1735,8 +1743,8 @@
|
||||
# Display system runlevel, load and usage info.
|
||||
printf $fd "<tr>\n";
|
||||
printf $fd " <td><b>Uptime:</b></td>\n";
|
||||
|
@ -88,3 +109,26 @@
|
|||
printf $fd "</tr>\n";
|
||||
|
||||
printf $fd "</table></p>\n\n";
|
||||
@@ -1896,7 +1904,7 @@
|
||||
$tests = $index;
|
||||
}
|
||||
|
||||
- # Create directories.
|
||||
+ # Create directories.
|
||||
my @creatingDirectories = ( ${TMPDIR}, ${RESULTDIR} );
|
||||
createDirrectoriesIfNotExists(@creatingDirectories);
|
||||
|
||||
@@ -1937,7 +1945,7 @@
|
||||
my $isOutputFormatCsv = defined($ubOutputCsv) && $ubOutputCsv eq "true";
|
||||
# If write CSV, header needs only once.
|
||||
my $is_csv_header_written = 0;
|
||||
-
|
||||
+
|
||||
# Open the log file for writing.
|
||||
open(my $reportFd, ">", $reportFile) ||
|
||||
die("Run: can't write to $reportFile\n");
|
||||
@@ -1998,4 +2006,3 @@
|
||||
|
||||
|
||||
exit(main(@ARGV));
|
||||
-
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- src/big.c.orig 2015-06-04 17:20:18 UTC
|
||||
+++ src/big.c
|
||||
@@ -583,7 +583,7 @@ void dumpwork(void)
|
||||
void fatal(char *s)
|
||||
{
|
||||
int i;
|
||||
- fprintf(stderr, s);
|
||||
+ fprintf(stderr, "%s", s);
|
||||
fflush(stderr);
|
||||
perror("Reason?");
|
||||
fflush(stderr);
|
|
@ -1,19 +0,0 @@
|
|||
--- src/dhry_1.c.orig 2015-06-04 17:20:18 UTC
|
||||
+++ src/dhry_1.c
|
||||
@@ -34,6 +34,7 @@
|
||||
***************************************************************************/
|
||||
char SCCSid[] = "@(#) @(#)dhry_1.c:3.4 -- 5/15/91 19:30:21";
|
||||
|
||||
+#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -81,7 +82,7 @@ extern int times ();
|
||||
/* Measurements should last at least about 2 seconds */
|
||||
#endif
|
||||
#ifdef TIME
|
||||
-extern long time();
|
||||
+extern time_t time();
|
||||
/* see library function "time" */
|
||||
#define Too_Small_Time 2
|
||||
/* Measurements should last at least 2 seconds */
|
|
@ -1,11 +0,0 @@
|
|||
--- src/syscall.c.orig 2015-06-04 17:20:18 UTC
|
||||
+++ src/syscall.c
|
||||
@@ -90,7 +90,7 @@ char *argv[];
|
||||
fprintf(stderr,"%s: fork failed\n", argv[0]);
|
||||
exit(1);
|
||||
} else if (pid == 0) {
|
||||
- execl("/bin/true", (char *) 0);
|
||||
+ execl("/bin/true", (char *) 0, (char *) 0);
|
||||
fprintf(stderr,"%s: exec /bin/true failed\n", argv[0]);
|
||||
exit(1);
|
||||
} else {
|
|
@ -1 +1,7 @@
|
|||
UnixBench based on the BYTE UNIX Benchmarks v3.
|
||||
The purpose of UnixBench is to provide a basic indicator of the performance
|
||||
of a Unix-like system; hence, multiple tests are used to test various aspects of
|
||||
the system's performance. These test results are then compared to the scores
|
||||
from a baseline system to produce an index value, which is generally easier to
|
||||
handle than the raw scores. The entire set of index values is then combined to
|
||||
make an overall index for the system.
|
||||
|
|
|
@ -23,6 +23,7 @@ libexec/unixbench/pgms/short
|
|||
libexec/unixbench/pgms/spawn
|
||||
libexec/unixbench/pgms/syscall
|
||||
libexec/unixbench/pgms/tst.sh
|
||||
libexec/unixbench/pgms/ubgears
|
||||
libexec/unixbench/pgms/unixbench.logo
|
||||
libexec/unixbench/pgms/whetstone-double
|
||||
libexec/unixbench/testdir/cctest.c
|
||||
|
|
Loading…
Add table
Reference in a new issue