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>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages benchmark)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix git-download)
31 #:use-module (guix build-system cmake)
32 #:use-module (guix build-system gnu)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages check)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages linux)
37 #:use-module (gnu packages maths)
38 #:use-module (gnu packages mpi)
39 #:use-module (gnu packages perl)
40 #:use-module (gnu packages python)
41 #:use-module (gnu packages python-science)
42 #:use-module (gnu packages python-xyz)
43 #:use-module (gnu packages storage)
44 #:use-module (ice-9 match))
52 (uri (string-append "https://brick.kernel.dk/snaps/"
53 "fio-" version ".tar.bz2"))
56 "0f2x917600y6k0xs34ixgfjm4v1ylbh8svpkqi07xy3474g5s2rv"))))
57 (build-system gnu-build-system)
59 '(#:test-target "test"
61 (modify-phases %standard-phases
64 (lambda* (#:key inputs outputs #:allow-other-keys)
65 (let ((out (assoc-ref outputs "out"))
66 (gnuplot (string-append (assoc-ref inputs "gnuplot")
68 (substitute* "tools/plot/fio2gnuplot"
69 (("/usr/share/fio") (string-append out "/share/fio"))
70 ;; FIXME (upstream): The 'gnuplot' executable is used inline
71 ;; in various os.system() calls mixed with *.gnuplot filenames.
72 (("; do gnuplot") (string-append "; do " gnuplot))
73 (("gnuplot mymath") (string-append gnuplot " mymath"))
74 (("gnuplot mygraph") (string-append gnuplot " mygraph")))
77 (lambda* (#:key outputs #:allow-other-keys)
78 ;; The configure script doesn't understand some of the
79 ;; GNU options, so we can't use #:configure-flags.
80 (let ((out (assoc-ref outputs "out")))
82 (string-append "--prefix=" out))
84 ;; The main `fio` executable is fairly small and self contained.
85 ;; Moving the auxiliary python and gnuplot scripts to a separate
86 ;; output saves almost 400 MiB on the closure.
87 (add-after 'install 'move-outputs
88 (lambda* (#:key outputs #:allow-other-keys)
89 (let ((oldbin (string-append (assoc-ref outputs "out") "/bin"))
90 (newbin (string-append (assoc-ref outputs "utils") "/bin")))
92 (for-each (lambda (file)
93 (let ((src (string-append oldbin "/" file))
94 (dst (string-append newbin "/" file)))
97 '("fio2gnuplot" "fiologparser_hist.py"
99 ;; Make sure numpy et.al is found.
100 (wrap-program (string-append newbin "/fiologparser_hist.py")
101 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
103 (outputs '("out" "utils"))
105 `(("ceph" ,ceph "lib")
109 ("python-numpy" ,python2-numpy)
110 ("python-pandas" ,python2-pandas)
111 ("python" ,python-2)))
112 (home-page "https://github.com/axboe/fio")
113 (synopsis "Flexible I/O tester")
115 "fio is a tool that will spawn a number of threads or processes doing a
116 particular type of I/O action as specified by the user. The typical use of fio
117 is to write a job file matching the I/O load one wants to simulate.")
118 ;; The software is distributed under the GPL2, but a handful of components
119 ;; are covered by other licenses.
120 (license (list license:gpl2 license:gpl2+ license:bsd-2
121 license:public-domain))))
123 ;; Parameterized in anticipation of m(va)pich support
124 (define (intel-mpi-benchmarks mpi)
126 (name (string-append "intel-mpi-benchmarks"
127 (if (string=? (package-name mpi) "openmpi")
129 (string-append "-" (package-name mpi)))))
134 (url "https://github.com/intel/mpi-benchmarks")
135 (commit (string-append "IMB-v" version))))
136 (file-name (git-file-name name version))
139 "0si5xi6ilhd3w0gbsg124589pvp094hvf366rvjjb9pi7pdk5p4i"))))
140 (build-system gnu-build-system)
145 (modify-phases %standard-phases
149 (lambda* (#:key outputs #:allow-other-keys)
150 (define (benchmark? file stat)
151 (and (string-prefix? "IMB-" (basename file))
152 (executable-file? file)))
154 (let* ((out (assoc-ref outputs "out"))
155 (bin (string-append out "/bin")))
156 (for-each (lambda (file)
157 (install-file file bin))
158 (find-files "." benchmark?))
161 ;; The makefile doesn't express all the dependencies, it seems.
164 #:make-flags '("CC=mpicc" "CXX=mpicxx")))
165 (home-page "https://software.intel.com/en-us/articles/intel-mpi-benchmarks")
166 (synopsis "Benchmarks for the Message Passing Interface (MPI)")
168 "This package provides benchmarks for implementations of the @dfn{Message
169 Passing Interface} (MPI). It contains MPI performance measurements for
170 point-to-point and global communication, and file, operations for a range of
171 message sizes. The generated benchmark data fully characterize:
175 Performance of a cluster system, including node performance, network latency,
178 Efficiency of the MPI implementation.
180 (license license:cpl1.0)))
182 (define-public intel-mpi-benchmarks/openmpi
183 (intel-mpi-benchmarks openmpi))
185 (define-public imb-openmpi
186 (deprecated-package "imb-openmpi" intel-mpi-benchmarks/openmpi))
188 (define-public multitime
194 (uri (string-append "https://tratt.net/laurie/src/"
195 "multitime/releases/"
196 "multitime-" version ".tar.gz"))
199 "0iyfsdrbyqa7a4ifrh19l9a48hgv7ld6m0d8yf9bkl12q0qw91fx"))))
200 (build-system gnu-build-system)
201 (arguments '(#:tests? #f)) ; there are no tests
202 (home-page "https://tratt.net/laurie/src/multitime/")
203 (synopsis "Time command execution over multiple executions")
205 "The @code{time} utility is a simple and often effective way of measuring
206 how long a command takes to run (wall time). Unfortunately, running a command
207 once can give misleading timings. @code{multitime} is, in essence, a simple
208 extension to @code{time} which runs a command multiple times and prints the
209 timing means, standard deviations, mins, medians, and maxes having done so.
210 This can give a much better understanding of the command's performance.")
211 (license license:expat)))
213 (define-public benchmark
220 (url "https://github.com/google/benchmark")
221 (commit (string-append "v" version))))
222 (file-name (git-file-name name version))
225 "0r9dbg4cbk47gwmayys31a83m3y67k0kh1f6pl8i869rbd609ndh"))
226 (patches (search-patches "benchmark-unbundle-googletest.patch"))))
227 (build-system cmake-build-system)
229 `(("googletest" ,googletest)))
230 (home-page "https://github.com/google/benchmark")
231 (synopsis "Microbenchmark support library")
233 "Benchmark is a library to benchmark code snippets,
234 similar to unit tests.")
235 (license license:asl2.0)))
237 (define-public bonnie++
243 (uri (string-append "https://www.coker.com.au/bonnie++/bonnie++-"
247 "010bmlmi0nrlp3aq7p624sfaj5a65lswnyyxk3cnz1bqig0cn2vf"))))
248 (build-system gnu-build-system)
251 (arguments '(#:tests? #f)) ; there are no tests
252 (home-page "https://doc.coker.com.au/projects/bonnie/")
253 (synopsis "Hard drive and file system benchmark suite")
255 "Bonnie++ is a benchmark suite that is aimed at performing a number of
256 simple tests of hard drive and file system performance. Bonnie++ allows you to
257 benchmark how your file systems perform with respect to data read and write
258 speed, the number of seeks that can be performed per second, and the number of
259 file metadata operations that can be performed per second.")
260 (license license:gpl2))) ;GPL 2 only, see copyright.txt