summaryrefslogtreecommitdiff
path: root/app-benchmarks/tiobench
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-benchmarks/tiobench
reinit the tree, so we can have metadata
Diffstat (limited to 'app-benchmarks/tiobench')
-rw-r--r--app-benchmarks/tiobench/Manifest12
-rw-r--r--app-benchmarks/tiobench/files/0.3.3-LDFLAGS.patch12
-rw-r--r--app-benchmarks/tiobench/files/0.3.3-column-description-fix.patch21
-rw-r--r--app-benchmarks/tiobench/files/0.3.3-glibc-2.16.patch21
-rw-r--r--app-benchmarks/tiobench/files/tiobench-0.4.2-fix-perl-shebang.patch51
-rw-r--r--app-benchmarks/tiobench/files/tiobench-0.4.2-gcc5.patch48
-rw-r--r--app-benchmarks/tiobench/metadata.xml12
-rw-r--r--app-benchmarks/tiobench/tiobench-0.3.3-r2.ebuild44
-rw-r--r--app-benchmarks/tiobench/tiobench-0.4.2.ebuild44
9 files changed, 265 insertions, 0 deletions
diff --git a/app-benchmarks/tiobench/Manifest b/app-benchmarks/tiobench/Manifest
new file mode 100644
index 000000000000..4ae08ca41b6f
--- /dev/null
+++ b/app-benchmarks/tiobench/Manifest
@@ -0,0 +1,12 @@
+AUX 0.3.3-LDFLAGS.patch 470 SHA256 56498d2262bb8af1e07b8fcde6f2bfae35fd1f20da82cbd96855ead2d8d4fe96 SHA512 2c352d6ba3f6c3cb669ce0a0fe51390a02b6ed2f34436464561c45de08143d3fd14fccf609c9f8c1332a1ad2349b78b40e2a648f1b36caf521a793b8ee8c6c6a WHIRLPOOL 6854fd5f2b79b075e158fb0e83cef7f4fd617e5cfb70363f63aa8848ecf5560d90babb331f0fe1b35662a6fd1f92ce906214332931610de7a60254e6d4ff100e
+AUX 0.3.3-column-description-fix.patch 1032 SHA256 657c78edb76a40367ad026cbd5a195d8a36dfc4ad6c024524f39792120efdfe8 SHA512 b34ad47a75d99bb24ae04f2e2e578c1e957b8459250f201e35d535c3c70731d5e792ccff67192b0c4fa9b634e8e099539b94ba22de8bb37cf80c0f4851cf1883 WHIRLPOOL 2a66936b87f703f2e61c785c4509842571f2e589d0a6c0574b87c122561ff169139d8f750529dc974e7d87406412f5f2a1c7426a95134589c340ee7936a3759f
+AUX 0.3.3-glibc-2.16.patch 717 SHA256 6d1ed918a6b92ab801ee1c8183976d4145f3ce938356de4b697aed234cd068a2 SHA512 6ca5a5654f703243aeee5428c8dc133df97f47e55f536e6c9aa89455b54f0578b4af19119ad7bf868844fcf531b8fb93a1b4d9ad1f44527746b9c87c456d6cde WHIRLPOOL 0ac77f9a7ff3af271a793fa85d657997e1f5a18255de53b59e8386f8ad5f4f31d14db092fa915c3858e973198f6119c8eb482799e368dae181e677145741378e
+AUX tiobench-0.4.2-fix-perl-shebang.patch 1530 SHA256 ca307683cbb05e84b92731ab79bcd5ed6c9b2d3bb643b9ccc9adf8b239eebc6a SHA512 baba72c336006d3f2c69768720bb076b8f2750d72252cf19b74e4f5b9e0140e74de1edfc63da674f26d24d675f4e00201be61f98cd7fd164b1c13cfab49f3b38 WHIRLPOOL ddd2e33aab1bf7c8e62b1cbd8346ae34909c84a9a6d075e219df6ef0ad38ee09a24c724950f3916fe70e139e657f855a27a9ad000d5cf87afafb8fee4c94b902
+AUX tiobench-0.4.2-gcc5.patch 1309 SHA256 28f88a3480c7471fcc00fba2c55566ef43fdfbc238939813f8f170b62d0ea6ea SHA512 f462c4eab88aa707a8383fec9e6e8c15f72237ef3d67f8481d2d6abef855f68b5a4281a7a1f1668b968df988e9ac283e4aabb2dfaf68b33cd3430a90e59f97a7 WHIRLPOOL bf366bbea2028e778cd714f59a3d943cb73337822b0c0c40749bb70ae5f8b544f54f9ad169e43e061eab2e7d24eecc2f67b310af9724513500c6c91e39f5fda6
+DIST tiobench-0.3.3.tar.gz 28282 SHA256 8ad011059a35ac70cdb5e3d3999ceee44a8e8e9078926844b0685b7ea9db2bcc SHA512 e2752e32e9deaea611217629e99dc8fd738e63b4a21f49a0286f894bece3a258a3d223e0eb403ad5350dbb408738b9c5ba7300a85c8eea464266152965730328 WHIRLPOOL f6bb9b353cbbf007f6095caa5e893b3bac9af2f4cdb681be9b3f1abf6e07a5b4cd8dd0ceebfa96fd4a888fa28528a78ce00ff239c93cb96a11795168e4b2e81e
+DIST tiobench-0.4.2.tar.gz 32182 SHA256 d6166edd6892725d413566ffe348d58927726fa7fa000efb384f7bcccad2e0ba SHA512 02e82d86ee889a366c1a00d4fb49f63d926e44ba6e2f297212479a5c13abe008b62c12d44483de7e971b5ebf875d5c07847f1d69dd11b2e87a050e27d8f9f09f WHIRLPOOL 8b6e5601b3079943eb1c7adf2d2fb12d05f36eaba19552c76b042b37743b0ceda5e5fd105cd64db6c0b2c111e20f9c54424113a427ad7b790a01a714c2bc1f87
+EBUILD tiobench-0.3.3-r2.ebuild 1000 SHA256 42b41531568c26569ac14ef66f273ab43375ea4fc0b84717d1c2927037ff337d SHA512 8bcd7871457bec7dc7f5b0ba3957d39352dbb2e1792ea4aadaadb8f977a3a1f3072907e4dad7075463d0499473cd535799030ddbc4e6fccb4978680b8cc8629b WHIRLPOOL 427280f9d16f25e1c5cdf2f80b706d5be76cb4fa5caa9bf8e7e455bc98ffb8dc47a5f25ea2068739da85adc61871644ee827da4231785133b1b23817c69d8252
+EBUILD tiobench-0.4.2.ebuild 891 SHA256 ac5254132375c77b8b480dd259c9eb8df1beae0582432af8920c2bc57f55bae2 SHA512 2749131275caa448748c0a3e9a7741ad5b7aa6d39915f526c0863203a67074fc4cec8422ecbe3167836fa292d218119cb837585c66b6e6b876e084fcc5a9aa0d WHIRLPOOL 2c5333ece5f97d3884f9f8c3cec126860625c284ed2585555521166a130cc46fa2ab4b0c5fcb95559892366303db050869da8ad173483591b71cf68c21912f88
+MISC ChangeLog 2701 SHA256 d70970e1e98ed80e94c7f3190c6cc3348e9d78e259d9b8ed036905935265d986 SHA512 3f0b7dad1d131c4009b82066d328d1e78b77a3449cf8858ed2cec830991c70c8c17c4d78b964ea6f11eba5895e010f85e42b47dfc5120eece7f33b68e24b328f WHIRLPOOL ad070f8e792d4135b725203f196328247eae1a9c42a6cb4f1ecdd0c8b8e93a356bc5b37c6434f70f27707ea6cb72a4a37550692415ed1e195734cb4fcf21fbe3
+MISC ChangeLog-2015 2570 SHA256 2e20628766f82c6911543efa491efec906dd96a1a6fe39e326ab78c0067a1294 SHA512 a4ddbfe0f8514f21d77b6108282f969f5380758d9c4da8d2110848f7a3fbf8f4579a053addf51cbdf6348196c019b6bc911571351cce5d552bb3772449574872 WHIRLPOOL 8f90ebfa3512c9a36f52c5c707d2ee975c71b23eab540041e6b13a16fdf7c611f62ae1baedeaa523441acad82f729ce2db55e299dac9d71772f9e862bd17a56c
+MISC metadata.xml 382 SHA256 8b55345e41bacdff92fa4cfda5ebbe0be02f3682205b290766d196ef516d6f12 SHA512 ab6ce68c948d173a0241be91da8af3f3690510b521307efe0752f6ca9db17ef573f2980bc16fe904c26123cf2802035de97e58f39d1f60d19ed827d53d06fb34 WHIRLPOOL 19838e39f11fa7463e0e23b7fa4f38338c958a2444d8f397f5cc5912f3d61f73c02ca2351a80a05c7054ae904982842165054620c8dd514ce9b5ecaf9e2c921c
diff --git a/app-benchmarks/tiobench/files/0.3.3-LDFLAGS.patch b/app-benchmarks/tiobench/files/0.3.3-LDFLAGS.patch
new file mode 100644
index 000000000000..9145ae47044a
--- /dev/null
+++ b/app-benchmarks/tiobench/files/0.3.3-LDFLAGS.patch
@@ -0,0 +1,12 @@
+diff -Nur tiobench-0.3.3.orig/Makefile tiobench-0.3.3/Makefile
+--- tiobench-0.3.3.orig/Makefile 2002-03-13 20:22:55.000000000 +0000
++++ tiobench-0.3.3/Makefile 2006-09-16 17:07:21.181644608 +0000
+@@ -34,7 +34,7 @@
+ $(CC) -c $(CFLAGS) $(DEFINES) tiotest.c -o tiotest.o
+
+ $(EXE): tiotest.o crc32.o
+- $(LINK) -o $(EXE) tiotest.o crc32.o -lpthread
++ $(LINK) -o $(EXE) $(LDFLAGS) tiotest.o crc32.o -lpthread
+ @echo
+ @echo "./tiobench.pl --help for usage options"
+ @echo
diff --git a/app-benchmarks/tiobench/files/0.3.3-column-description-fix.patch b/app-benchmarks/tiobench/files/0.3.3-column-description-fix.patch
new file mode 100644
index 000000000000..b3ebb90b33e1
--- /dev/null
+++ b/app-benchmarks/tiobench/files/0.3.3-column-description-fix.patch
@@ -0,0 +1,21 @@
+--- tiobench.pl 2005-02-23 00:21:33.000000000 +0100
++++ tiobench.pl 2005-03-15 18:11:19.000000000 +0100
+@@ -168,6 +168,8 @@
+ $stat_data{$identifier}{$thread}{$size}{$block}{$field}{'stime'} ) /
+ $stat_data{$identifier}{$thread}{$size}{$block}{$field}{'time'};
+ $stat_data{$identifier}{$thread}{$size}{$block}{$field}{'cpueff'} =
++ ($stat_data{$identifier}{$thread}{$size}{$block}{$field}{'cpu'} == 0) ?
++ '0' :
+ ($stat_data{$identifier}{$thread}{$size}{$block}{$field}{'rate'} /
+ ($stat_data{$identifier}{$thread}{$size}{$block}{$field}{'cpu'}/100));
+ }
+@@ -196,6 +198,9 @@
+ $report{'SEQ_WRITES'} = "Sequential Writes";
+ $report{'RAND_WRITES'} = "Random Writes";
+
++# The top is the same for all 4 reports
++$^ = 'SEQ_READS_TOP';
++
+ foreach my $title ('SEQ_READS', 'RAND_READS', 'SEQ_WRITES', 'RAND_WRITES') {
+ $-=0; $~="$title"; $^L=''; # reporting variables
+ print "\n$report{$title}\n";
diff --git a/app-benchmarks/tiobench/files/0.3.3-glibc-2.16.patch b/app-benchmarks/tiobench/files/0.3.3-glibc-2.16.patch
new file mode 100644
index 000000000000..fed845a51d62
--- /dev/null
+++ b/app-benchmarks/tiobench/files/0.3.3-glibc-2.16.patch
@@ -0,0 +1,21 @@
+diff -Nur tiobench-0.3.3.orig/tiotest.c tiobench-0.3.3/tiotest.c
+--- tiobench-0.3.3.orig/tiotest.c 2001-03-05 02:34:00.000000000 +0000
++++ tiobench-0.3.3/tiotest.c 2012-11-04 22:44:41.695677071 +0000
+@@ -31,7 +31,7 @@
+ */
+ ArgumentOptions args;
+
+-static void * aligned_alloc(ssize_t size)
++static void * tio_aligned_alloc(ssize_t size)
+ {
+ caddr_t a;
+ a = mmap((caddr_t )0, size,
+@@ -281,7 +281,7 @@
+ pthread_attr_setscope(&(d->threads[i].thread_attr),
+ PTHREAD_SCOPE_SYSTEM);
+
+- d->threads[i].buffer = aligned_alloc( d->threads[i].blockSize );
++ d->threads[i].buffer = tio_aligned_alloc( d->threads[i].blockSize );
+ if( d->threads[i].buffer == NULL )
+ {
+ perror("Error allocating memory");
diff --git a/app-benchmarks/tiobench/files/tiobench-0.4.2-fix-perl-shebang.patch b/app-benchmarks/tiobench/files/tiobench-0.4.2-fix-perl-shebang.patch
new file mode 100644
index 000000000000..900472d80dd2
--- /dev/null
+++ b/app-benchmarks/tiobench/files/tiobench-0.4.2-fix-perl-shebang.patch
@@ -0,0 +1,51 @@
+Fix perl shebangs, in order to be maximally compatible with Gentoo Prefix.
+Rationale: https://blogs.gentoo.org/mgorny/2016/02/08/a-quick-note-on-portable-shebangs/
+
+--- a/scripts/makeimages.pl
++++ b/scripts/makeimages.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # Author: James Manning <jmm@users.sf.net>
+ # This software may be used and distributed according to the terms of
+@@ -8,6 +8,7 @@
+ # Perl wrapper for calling tiobench.pl and displaying results
+ # graphically using gnuplot
+
++use warnings;
+ use strict;
+
+ my $args = join(" ",@ARGV);
+--- a/scripts/tiosum.pl
++++ b/scripts/tiosum.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ # Author: Randy Hron <rwhron (at) earthlink dot net>
+ # This software may be used and distributed according to the terms of
+ # the GNU General Public License, http://www.gnu.org/copyleft/gpl.html
+@@ -6,6 +6,7 @@
+ # Summarize output of tiobench2.pl for multiple kernels/runs.
+ # Assumes logfiles created with:
+ # ./tiobench2.pl > tiobench-`uname -r` 2> tiobench-`uname -r`.err
++use warnings;
+ use strict;
+ $|++;
+
+--- a/tiobench.pl
++++ b/tiobench.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # Author: James Manning <jmm at users.sf.net>
+ # Author: Randy Hron <rwhron at earthlink dot net>
+@@ -9,6 +9,7 @@
+ # Perl wrapper for calling the tiotest executable multiple times
+ # with varying sets of parameters as instructed
+
++use warnings;
+ use strict;
+ use Getopt::Long;
+
diff --git a/app-benchmarks/tiobench/files/tiobench-0.4.2-gcc5.patch b/app-benchmarks/tiobench/files/tiobench-0.4.2-gcc5.patch
new file mode 100644
index 000000000000..e1bf89b87ec3
--- /dev/null
+++ b/app-benchmarks/tiobench/files/tiobench-0.4.2-gcc5.patch
@@ -0,0 +1,48 @@
+diff --git a/crc32.c b/crc32.c
+index bae7384..a22fc5d 100644
+--- a/crc32.c
++++ b/crc32.c
+@@ -72,10 +72,9 @@ static const unsigned long crctab[256] = {
+ 0xA2F33668, 0xBCB4666D, 0xB8757BDA, 0xB5365D03, 0xB1F740B4
+ };
+
+-inline
+-unsigned long crc32( const void* buffer,
+- unsigned long length,
+- unsigned long crc)
++unsigned long crc32(const void* buffer,
++ unsigned long length,
++ unsigned long crc)
+ {
+ const unsigned char* cp = (const unsigned char*)buffer;
+
+diff --git a/crc32.h b/crc32.h
+index 62b3433..cb9b96f 100644
+--- a/crc32.h
++++ b/crc32.h
+@@ -18,9 +18,8 @@
+ #ifndef CRC32_H
+ #define CRC32_H
+
+-inline
+-unsigned long crc32( const void* const buffer,
+- unsigned long length,
+- unsigned long crc);
++unsigned long crc32(const void* const buffer,
++ unsigned long length,
++ unsigned long crc);
+
+ #endif
+diff --git a/tiotest.c b/tiotest.c
+index c23ceb4..bb73fcb 100644
+--- a/tiotest.c
++++ b/tiotest.c
+@@ -1392,7 +1392,7 @@ static int do_mmap_read_operation(void *loc, ThreadData *d)
+
+ if(crc != d->bufferCrc)
+ {
+- fprintf(stderr, "Thread(%lu) mmap consistency check failed at 0x%x\n", d->myNumber, (unsigned int)loc);
++ fprintf(stderr, "Thread(%lu) mmap consistency check failed at 0x%p\n", d->myNumber, loc);
+ return -1;
+ }
+ }
diff --git a/app-benchmarks/tiobench/metadata.xml b/app-benchmarks/tiobench/metadata.xml
new file mode 100644
index 000000000000..c217c527e32b
--- /dev/null
+++ b/app-benchmarks/tiobench/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>alicef@gentoo.org</email>
+ <name>Alice Ferrazzi</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">mkuoppal/tiobench</remote-id>
+ <remote-id type="sourceforge">tiobench</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-benchmarks/tiobench/tiobench-0.3.3-r2.ebuild b/app-benchmarks/tiobench/tiobench-0.3.3-r2.ebuild
new file mode 100644
index 000000000000..cd8d0a25822d
--- /dev/null
+++ b/app-benchmarks/tiobench/tiobench-0.3.3-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Portable, robust, fully-threaded I/O benchmark program"
+HOMEPAGE="http://tiobench.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86 amd64 ppc ppc64"
+IUSE=""
+
+RDEPEND="dev-lang/perl"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PV}-column-description-fix.patch
+ epatch "${FILESDIR}"/${PV}-LDFLAGS.patch
+ epatch "${FILESDIR}"/${PV}-glibc-2.16.patch
+
+ sed -i \
+ -e 's:/usr/local/bin:/usr/sbin:' tiobench.pl \
+ || die "sed tiobench.pl failed"
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LINK="$(tc-getCC)" \
+ DEFINES="-DLARGEFILES" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ || die "emake failed"
+}
+
+src_install() {
+ dosbin tiotest tiobench.pl tiosum.pl || die "dosbin failed"
+ dodoc BUGS ChangeLog README TODO || die "dodoc failed"
+}
diff --git a/app-benchmarks/tiobench/tiobench-0.4.2.ebuild b/app-benchmarks/tiobench/tiobench-0.4.2.ebuild
new file mode 100644
index 000000000000..339da5860de9
--- /dev/null
+++ b/app-benchmarks/tiobench/tiobench-0.4.2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Portable, robust, fully-threaded I/O benchmark program"
+HOMEPAGE="https://github.com/mkuoppal/tiobench"
+SRC_URI="https://github.com/mkuoppal/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE=""
+
+RDEPEND="dev-lang/perl"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc5.patch
+ "${FILESDIR}"/${P}-fix-perl-shebang.patch
+)
+
+src_prepare() {
+ default
+ sed -i \
+ -e "s:/usr/local/bin:${EPREFIX}/usr/sbin:" tiobench.pl \
+ || die "sed tiobench.pl failed"
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LINK="$(tc-getCC)" \
+ DEFINES="-DLARGEFILES" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dosbin tiotest tiobench.pl scripts/tiosum.pl
+ einstalldocs
+}