From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qO8dE6XLIGLJEgAAgWs5BA (envelope-from ) for ; Thu, 03 Mar 2022 15:07:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KPqRD6XLIGJ9gQEAauVa8A (envelope-from ) for ; Thu, 03 Mar 2022 15:07:33 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CCC6C3C3E7 for ; Thu, 3 Mar 2022 15:07:32 +0100 (CET) Received: from localhost ([::1]:48948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPm79-0005wk-Qa for larch@yhetil.org; Thu, 03 Mar 2022 09:07:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPm6h-0005Ju-Fv for guix-patches@gnu.org; Thu, 03 Mar 2022 09:07:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47976) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nPm6h-0003rL-7S for guix-patches@gnu.org; Thu, 03 Mar 2022 09:07:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nPm6h-0004r1-2j for guix-patches@gnu.org; Thu, 03 Mar 2022 09:07:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54235] [PATCH 3/3] gnu: Add sysbench. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 03 Mar 2022 14:07:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54235 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54235@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 54235-submit@debbugs.gnu.org id=B54235.164631638918600 (code B ref 54235); Thu, 03 Mar 2022 14:07:03 +0000 Received: (at 54235) by debbugs.gnu.org; 3 Mar 2022 14:06:29 +0000 Received: from localhost ([127.0.0.1]:41871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPm65-0004ps-BV for submit@debbugs.gnu.org; Thu, 03 Mar 2022 09:06:29 -0500 Received: from mail-qk1-f179.google.com ([209.85.222.179]:33313) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPm60-0004pc-NM for 54235@debbugs.gnu.org; Thu, 03 Mar 2022 09:06:24 -0500 Received: by mail-qk1-f179.google.com with SMTP id bm39so3971238qkb.0 for <54235@debbugs.gnu.org>; Thu, 03 Mar 2022 06:06:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IX8vRvcISVark35EbGU5iQ5o6u2tuWGt0sPKYGxZw38=; b=gX9boY1Fevc7op+00n+aqsxWzvJqFGLZKY+8bynSYI29RDsmrK4l9vvZOs9wo9el4j 74i57qm1cJihmsXEOF+htoowjLgqPVJ+ewEna2gXoD08H3wuigaFQpZQLDz7jmdKhxzI fajPAlG97+6HVfLkX5jPq4+y0EOJY5x5lvcg6BGMS68x7KJUU8b4xs2Zq07/U6nlOtsS PE4chziFti3cF70U85sh7kHPH9LdWwN6zKU9BZxNzEwwkI+/RDrNg4unefrzYf8+8XuT KRtIVjP8Yy1flv/uE7mHTfjKGQgpe0j0NO9RnbANO9bcla2QU77ye7RvFtJgCz/W8PNC GYng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IX8vRvcISVark35EbGU5iQ5o6u2tuWGt0sPKYGxZw38=; b=AtcpqC4D6B7feHI8Hr4zAPxAP3MHrTqfFAjc9tCzm1WsYG2WSWdad2gLcezslPivf8 H+3iiweOTAYwVwoRsiuz//+oBhSZWqplVZlCCDp+8pRaEDWa5lHPcEnUV2NThlVFvAfd k+G82zLmVYrbS5qXbBxJt4vTaeL4AP5D71zTGoGjvBYKOqcQVc52yWjkhTgOhscUl2HV HVm4VDSX21JBkpRxySBKazegvodcobjbLajo+3Waa4kDxWAnlbrQXB72uAYp2lQFnK7u JbMu8205bHCH6C2+2V+vU9KF1AK4K/sWDNDg9am4GXHGQqgKTKJYxcT/Ch3wViJ0Nbgu mUQw== X-Gm-Message-State: AOAM530ct0+X39pbmVjjkVRVmijcIzpWqbbuvSb+aHvHGFxOVPwEj5ns WRMwUPmfYrNy6ma8k2ZY/VwQzheQTJc= X-Google-Smtp-Source: ABdhPJzpz2ceojhXQ6AFNpMopH/rw42SvMQZL0w9pVMA2QYJjwD64TKyYBLrT1WIUdl2wETmHBluoQ== X-Received: by 2002:a05:620a:22d0:b0:648:e106:49fc with SMTP id o16-20020a05620a22d000b00648e10649fcmr18680617qki.242.1646316374836; Thu, 03 Mar 2022 06:06:14 -0800 (PST) Received: from localhost.localdomain (dsl-141-39.b2b2c.ca. [66.158.141.39]) by smtp.gmail.com with ESMTPSA id c16-20020a05622a059000b002dc93dc92d1sm1601272qtb.48.2022.03.03.06.06.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 06:06:14 -0800 (PST) From: Maxim Cournoyer Date: Thu, 3 Mar 2022 09:05:58 -0500 Message-Id: <20220303140558.29261-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220303140558.29261-1-maxim.cournoyer@gmail.com> References: <20220303140558.29261-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646316452; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=IX8vRvcISVark35EbGU5iQ5o6u2tuWGt0sPKYGxZw38=; b=C/wugzCfu5DkSn5TZMRIOnoUbWEWTQA5CywFCtOpkcpl9jQlQLUKWmvb7lCGds0jF8jLUm FUzzWnN4zILhf9jEvtvHm2geT+JtIqhbOEiWhimU27I1ft+Vq5koCxhKZH0LTlrgYGmzvc 0sv7L5PDOwndKsGEubDIAPiX2BGfPz44/i/9Z0l8ksQRaPhq+tbA/YobJxGZVxTBJk41Bl 1vjsIzvF1z1226sKVLSLaw3Tgou7yE9ollYDDn6TUjboNctFH5yaTScuptyd7xlYXl6AD/ qW80jc7rTfAGz8wptC59XcELEXamTm1p3/1Os0hMeDlD5XM3XB2HpzQwgmVqIg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646316452; a=rsa-sha256; cv=none; b=ZHmvg7eOPzboEHMGDtkTlzZd/2d4l54Y7ss5BH8pcOvNJiuSdJuM6AuwcPJ1DS4NrwI8HO 3yVJpz1PARS22v8ix/T9qRPDkA9Xq8PeWBQ0fRDVf/hambJuXo73RR4WbzN6tyNuCgyiv+ R02bRvwLZ4h5cfVojoKkZSi5YzSvJbZuQ9W9eHCNg2la+KRz73TAXhe8MY2wQXe639cpQt YvDx3K2wDEM0SgEFKtvuyp8WYBdyE0QbULCU97CJOSQiPjjqiJjR3arhHik8vHFu67cjn9 kMZTvdzEoHeme0PjJN40Ar1JokFZw/wmhR5O+2pUTWGhNlwv0dZxYiFvHsVNVg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=gX9boY1F; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=gX9boY1F; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: CCC6C3C3E7 X-Spam-Score: 5.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: c16qpefbjmmK * gnu/packages/benchmark.scm (sysbench): New variable. --- gnu/packages/benchmark.scm | 140 ++++++++++++++++++++++++++++++++++++- 1 file changed, 139 insertions(+), 1 deletion(-) diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm index 537f6262c4..69de11d998 100644 --- a/gnu/packages/benchmark.scm +++ b/gnu/packages/benchmark.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2019, 2021 Ludovic Courtès ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 malte Frank Gerdes -;;; Copyright © 2020, 2021 Maxim Cournoyer +;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer ;;; Copyright © 2020 Greg Hogan ;;; Copyright © 2021 Arun Isaac ;;; @@ -31,22 +31,31 @@ (define-module (gnu packages benchmark) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system cmake) #: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 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 xml) #:use-module (ice-9 match)) (define-public fio @@ -383,3 +392,132 @@ (define-public clpeak devices. It only measures the peak metrics that can be achieved using vector operations and does not represent a real-world use case.") (license license:unlicense)))) + +(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 inputs #:allow-other-keys) + (substitute* "m4/ax_check_docbook.m4" + (("DOCBOOK_ROOT=.*" all) + (string-append + all "XML_CATALOG=" + (search-input-file 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 + 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 + 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