From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 54235@debbugs.gnu.org
Cc: maximedevos@telenet.be, Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [bug#54235] [PATCH v3 4/4] gnu: Add sysbench.
Date: Tue, 8 Mar 2022 09:36:07 -0500 [thread overview]
Message-ID: <20220308143607.7449-4-maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <20220308143607.7449-1-maxim.cournoyer@gmail.com>
* gnu/packages/benchmark.scm (sysbench): New variable.
---
gnu/packages/benchmark.scm | 139 +++++++++++++++++++++++++++++++++++++
1 file changed, 139 insertions(+)
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm
index eb5df3d4c3..0277c9e7b9 100644
--- a/gnu/packages/benchmark.scm
+++ b/gnu/packages/benchmark.scm
@@ -37,19 +37,27 @@ (define-module (gnu packages benchmark)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages c)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages kde-frameworks)
+ #:use-module (gnu packages databases)
+ #:use-module (gnu packages docbook)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages lua)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages opencl)
#:use-module (gnu packages perl)
+ #:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
+ #:use-module (gnu packages xml)
#:use-module (ice-9 match))
(define-public fio
@@ -430,3 +438,134 @@ (define-public kdiskmark
@item Report generation.
@end itemize")
(license license:gpl3+)))
+
+(define-public sysbench
+ (package
+ (name "sysbench")
+ (version "1.0.20")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/akopytov/sysbench")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet '(begin
+ ;; Ensure no bundled libraries get used.
+ (delete-file-recursively "third_party")
+ (substitute* "configure.ac"
+ (("^third_party/.*")
+ ""))
+ (substitute* "Makefile.am"
+ ((".*(LUAJIT|CK)_DIR =.*")
+ ""))))
+ (sha256
+ (base32
+ "1sanvl2a52ff4shj62nw395zzgdgywplqvwip74ky8q7s6qjf5qy"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "--with-pgsql"
+ ;; Explicitly specify the library directory of
+ ;; MySQL, otherwise `mysql_config` gets
+ ;; consulted and adds unnecessary link
+ ;; directives.
+ (string-append "--with-mysql-libs="
+ #$(this-package-input "mysql")
+ "/lib")
+ "--with-system-luajit"
+ "--with-system-ck"
+ ;; If we let the build tool select the most
+ ;; optimal compiler architecture flag, the
+ ;; build is not reproducible.
+ "--without-gcc-arch")
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-test-runner
+ (lambda _
+ (substitute* "tests/test_run.sh"
+ (("/bin/bash")
+ (which "bash"))
+ ;; Do not attempt to invoke the cram command via
+ ;; Python, as on Guix it is a shell script (wrapper).
+ (("\\$\\(command -v cram\\)")
+ "-m cram"))))
+ (add-after 'unpack 'disable-test-installation
+ (lambda _
+ (substitute* "tests/Makefile.am"
+ (("install-data-local")
+ "do-not-install-data-local")
+ (("^test_SCRIPTS.*")
+ ""))))
+ (add-after 'unpack 'fix-docbook
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (substitute* "m4/ax_check_docbook.m4"
+ (("DOCBOOK_ROOT=.*" all)
+ (string-append
+ all "XML_CATALOG="
+ (search-input-file (or native-inputs inputs)
+ "xml/dtd/docbook/catalog.xml")
+ "\n")))
+ (substitute* "doc/xsl/xhtml.xsl"
+ (("http://docbook.sourceforge.net/release/xsl\
+/current/xhtml/docbook.xsl")
+ (search-input-file
+ (or native-inputs inputs)
+ (string-append "xml/xsl/docbook-xsl-"
+ #$(package-version docbook-xsl)
+ "/xhtml/docbook.xsl"))))
+ (substitute* "doc/xsl/xhtml-chunk.xsl"
+ (("http://docbook.sourceforge.net/release/xsl\
+/current/xhtml/chunk.xsl")
+ (search-input-file
+ (or native-inputs inputs)
+ (string-append "xml/xsl/docbook-xsl-"
+ #$(package-version docbook-xsl)
+ "/xhtml/chunk.xsl")))))))))
+ (native-inputs (list autoconf
+ automake
+ libtool
+ pkg-config
+ python-cram
+ python-wrapper
+ which
+ ;; For documentation
+ libxml2 ;for XML_CATALOG_FILES
+ libxslt
+ docbook-xml-4.1.2
+ docbook-xsl))
+ (inputs (list ck libaio luajit mysql postgresql))
+ (home-page "https://github.com/akopytov/sysbench/")
+ (synopsis "Scriptable database and system performance benchmark")
+ (description "@command{sysbench} is a scriptable multi-threaded benchmark
+tool based on LuaJIT. It is most frequently used for database benchmarks, but
+can also be used to create arbitrarily complex workloads that do not involve a
+database server. @command{sysbench} comes with the following bundled
+benchmarks:
+@table @file
+@item oltp_*.lua
+A collection of OLTP-like database benchmarks.
+@item fileio
+A filesystem-level benchmark.
+@item cpu
+A simple CPU benchmark.
+@item memory
+A memory access benchmark.
+@item threads
+A thread-based scheduler benchmark.
+@item mutex
+A POSIX mutex benchmark.
+@end table
+It includes features such as:
+@itemize
+@item
+Extensive statistics about rate and latency is available, including latency
+percentiles and histograms.
+@item
+Low overhead even with thousands of concurrent threads. @command{sysbench} is
+capable of generating and tracking hundreds of millions of events per second.
+@item
+New benchmarks can be easily created by implementing pre-defined hooks in
+user-provided Lua scripts.
+@item
+@end itemize")
+ (license license:gpl2+)))
--
2.34.0
prev parent reply other threads:[~2022-03-08 14:37 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 13:53 [bug#54235] [PATCH 0/3] Add sysbench Maxim Cournoyer
2022-03-03 14:05 ` [bug#54235] [PATCH 1/3] gnu: docbook-xml-4.1.2: Install an XML catalog file Maxim Cournoyer
2022-03-03 14:05 ` [bug#54235] [PATCH 2/3] gnu: Add ck Maxim Cournoyer
2022-03-03 16:55 ` Maxime Devos
2022-03-07 18:57 ` Maxim Cournoyer
2022-03-07 20:57 ` Maxime Devos
2022-03-08 1:47 ` Maxim Cournoyer
2022-03-08 4:06 ` Maxim Cournoyer
2022-03-03 14:05 ` [bug#54235] [PATCH 3/3] gnu: Add sysbench Maxim Cournoyer
2022-03-03 16:42 ` Maxime Devos
2022-03-07 18:59 ` Maxim Cournoyer
2022-03-08 4:38 ` [bug#54235] [PATCH v2 1/3] gnu: docbook-xml-4.1.2: Install an XML catalog file Maxim Cournoyer
2022-03-08 4:38 ` [bug#54235] [PATCH v2 2/3] gnu: Add ck Maxim Cournoyer
2022-03-08 9:39 ` Maxime Devos
2022-03-08 14:36 ` Maxim Cournoyer
2022-03-08 9:45 ` Maxime Devos
2022-03-08 14:38 ` Maxim Cournoyer
2022-03-08 9:49 ` Maxime Devos
2022-03-08 14:38 ` Maxim Cournoyer
2022-03-08 4:38 ` [bug#54235] [PATCH v2 3/3] gnu: Add sysbench Maxim Cournoyer
2022-03-08 9:42 ` Maxime Devos
2022-03-08 14:39 ` Maxim Cournoyer
2022-03-08 17:27 ` Maxime Devos
2022-03-18 5:38 ` bug#54235: [PATCH 0/3] " Maxim Cournoyer
2022-03-08 14:36 ` [bug#54235] [PATCH v3 1/4] gnu: docbook-xml-4.1.2: Install an XML catalog file Maxim Cournoyer
2022-03-08 14:36 ` [bug#54235] [PATCH v3 2/4] utils: Add ar-for-target and ld-for-target procedures Maxim Cournoyer
2022-03-08 14:36 ` [bug#54235] [PATCH v3 3/4] gnu: Add ck Maxim Cournoyer
2022-03-08 14:36 ` Maxim Cournoyer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220308143607.7449-4-maxim.cournoyer@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=54235@debbugs.gnu.org \
--cc=maximedevos@telenet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).