1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
3 ;;; Copyright © 2017 Dave Love <fx@gnu.org>
4 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
8 ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
9 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
10 ;;; Copyright © 2020 malte Frank Gerdes <malte.f.gerdes@gmail.com>
12 ;;; This file is part of GNU Guix.
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27 (define-module (gnu packages benchmark)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix git-download)
32 #:use-module (guix build-system cmake)
33 #:use-module (guix build-system gnu)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages check)
36 #:use-module (gnu packages compression)
37 #:use-module (gnu packages linux)
38 #:use-module (gnu packages maths)
39 #:use-module (gnu packages mpi)
40 #:use-module (gnu packages perl)
41 #:use-module (gnu packages python)
42 #:use-module (gnu packages python-science)
43 #:use-module (gnu packages python-xyz)
44 #:use-module (gnu packages storage)
45 #:use-module (ice-9 match))
53 (uri (string-append "https://brick.kernel.dk/snaps/"
54 "fio-" version ".tar.bz2"))
57 "0qshbyqpvm01hmpkmk0v0jhjz23sngqhy291kiz38z04s2df4vxn"))))
58 (build-system gnu-build-system)
60 '(#:test-target "test"
62 (modify-phases %standard-phases
65 (lambda* (#:key inputs outputs #:allow-other-keys)
66 (let ((out (assoc-ref outputs "out"))
67 (gnuplot (string-append (assoc-ref inputs "gnuplot")
69 (substitute* "tools/plot/fio2gnuplot"
70 (("/usr/share/fio") (string-append out "/share/fio"))
71 ;; FIXME (upstream): The 'gnuplot' executable is used inline
72 ;; in various os.system() calls mixed with *.gnuplot filenames.
73 (("; do gnuplot") (string-append "; do " gnuplot))
74 (("gnuplot mymath") (string-append gnuplot " mymath"))
75 (("gnuplot mygraph") (string-append gnuplot " mygraph")))
78 (lambda* (#:key outputs #:allow-other-keys)
79 ;; The configure script doesn't understand some of the
80 ;; GNU options, so we can't use #:configure-flags.
81 (let ((out (assoc-ref outputs "out")))
83 (string-append "--prefix=" out))
85 ;; The main `fio` executable is fairly small and self contained.
86 ;; Moving the auxiliary python and gnuplot scripts to a separate
87 ;; output saves almost 400 MiB on the closure.
88 (add-after 'install 'move-outputs
89 (lambda* (#:key outputs #:allow-other-keys)
90 (let ((oldbin (string-append (assoc-ref outputs "out") "/bin"))
91 (newbin (string-append (assoc-ref outputs "utils") "/bin")))
93 (for-each (lambda (file)
94 (let ((src (string-append oldbin "/" file))
95 (dst (string-append newbin "/" file)))
98 '("fio2gnuplot" "fiologparser_hist.py"
100 ;; Make sure numpy et.al is found.
101 (wrap-program (string-append newbin "/fiologparser_hist.py")
102 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
104 (outputs '("out" "utils"))
106 `(("ceph" ,ceph "lib")
110 ("python-numpy" ,python2-numpy)
111 ("python-pandas" ,python2-pandas)
112 ("python" ,python-2)))
113 (home-page "https://github.com/axboe/fio")
114 (synopsis "Flexible I/O tester")
116 "fio is a tool that will spawn a number of threads or processes doing a
117 particular type of I/O action as specified by the user. The typical use of fio
118 is to write a job file matching the I/O load one wants to simulate.")
119 ;; The software is distributed under the GPL2, but a handful of components
120 ;; are covered by other licenses.
121 (license (list license:gpl2 license:gpl2+ license:bsd-2
122 license:public-domain))))
124 ;; Parameterized in anticipation of m(va)pich support
125 (define (intel-mpi-benchmarks mpi)
127 (name (string-append "intel-mpi-benchmarks"
128 (if (string=? (package-name mpi) "openmpi")
130 (string-append "-" (package-name mpi)))))
135 (url "https://github.com/intel/mpi-benchmarks")
136 (commit (string-append "IMB-v" version))))
137 (file-name (git-file-name name version))
140 "0si5xi6ilhd3w0gbsg124589pvp094hvf366rvjjb9pi7pdk5p4i"))))
141 (build-system gnu-build-system)
146 (modify-phases %standard-phases
150 (lambda* (#:key outputs #:allow-other-keys)
151 (define (benchmark? file stat)
152 (and (string-prefix? "IMB-" (basename file))
153 (executable-file? file)))
155 (let* ((out (assoc-ref outputs "out"))
156 (bin (string-append out "/bin")))
157 (for-each (lambda (file)
158 (install-file file bin))
159 (find-files "." benchmark?))
162 ;; The makefile doesn't express all the dependencies, it seems.
165 #:make-flags '("CC=mpicc" "CXX=mpicxx")))
166 (home-page "https://software.intel.com/en-us/articles/intel-mpi-benchmarks")
167 (synopsis "Benchmarks for the Message Passing Interface (MPI)")
169 "This package provides benchmarks for implementations of the @dfn{Message
170 Passing Interface} (MPI). It contains MPI performance measurements for
171 point-to-point and global communication, and file, operations for a range of
172 message sizes. The generated benchmark data fully characterize:
176 Performance of a cluster system, including node performance, network latency,
179 Efficiency of the MPI implementation.
181 (license license:cpl1.0)))
183 (define-public intel-mpi-benchmarks/openmpi
184 (intel-mpi-benchmarks openmpi))
186 (define-public imb-openmpi
187 (deprecated-package "imb-openmpi" intel-mpi-benchmarks/openmpi))
189 (define-public multitime
195 (uri (string-append "https://tratt.net/laurie/src/"
196 "multitime/releases/"
197 "multitime-" version ".tar.gz"))
200 "0iyfsdrbyqa7a4ifrh19l9a48hgv7ld6m0d8yf9bkl12q0qw91fx"))))
201 (build-system gnu-build-system)
202 (arguments '(#:tests? #f)) ; there are no tests
203 (home-page "https://tratt.net/laurie/src/multitime/")
204 (synopsis "Time command execution over multiple executions")
206 "The @code{time} utility is a simple and often effective way of measuring
207 how long a command takes to run (wall time). Unfortunately, running a command
208 once can give misleading timings. @code{multitime} is, in essence, a simple
209 extension to @code{time} which runs a command multiple times and prints the
210 timing means, standard deviations, mins, medians, and maxes having done so.
211 This can give a much better understanding of the command's performance.")
212 (license license:expat)))
214 (define-public benchmark
221 (url "https://github.com/google/benchmark")
222 (commit (string-append "v" version))))
223 (file-name (git-file-name name version))
226 "13rxagpzw6bal6ajlmrxlh9kgfvcixn6j734b2bvfqz7lch8n0pa"))))
227 (build-system cmake-build-system)
229 `(("googletest-source" ,(package-source googletest))
230 ("googletest" ,googletest)))
233 (modify-phases %standard-phases
234 (add-after 'unpack 'unpack-googletest
235 (lambda* (#:key inputs #:allow-other-keys)
236 (copy-recursively (assoc-ref inputs "googletest-source")
239 (home-page "https://github.com/google/benchmark")
240 (synopsis "Microbenchmark support library")
242 "Benchmark is a library to benchmark code snippets, similar to unit
244 (license license:asl2.0)))
246 (define-public bonnie++
252 (uri (string-append "https://www.coker.com.au/bonnie++/bonnie++-"
256 "010bmlmi0nrlp3aq7p624sfaj5a65lswnyyxk3cnz1bqig0cn2vf"))))
257 (build-system gnu-build-system)
260 (arguments '(#:tests? #f)) ; there are no tests
261 (home-page "https://doc.coker.com.au/projects/bonnie/")
262 (synopsis "Hard drive and file system benchmark suite")
264 "Bonnie++ is a benchmark suite that is aimed at performing a number of
265 simple tests of hard drive and file system performance. Bonnie++ allows you to
266 benchmark how your file systems perform with respect to data read and write
267 speed, the number of seeks that can be performed per second, and the number of
268 file metadata operations that can be performed per second.")
269 (license license:gpl2))) ;GPL 2 only, see copyright.txt