Commit | Line | Data |
---|---|---|
c3ccba92 | 1 | ;;; GNU Guix --- Functional package management for GNU |
ac6fec05 | 2 | ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com> |
04717e94 | 3 | ;;; Copyright © 2017 Dave Love <fx@gnu.org> |
828b4a91 | 4 | ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr> |
61e265d2 | 5 | ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net> |
4b444fc5 | 6 | ;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org> |
4c7e8c23 | 7 | ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com> |
2d6f68aa | 8 | ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org> |
176dd26b | 9 | ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> |
d1ecb3bd | 10 | ;;; Copyright © 2020 malte Frank Gerdes <malte.f.gerdes@gmail.com> |
8999d2b4 | 11 | ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
b9ab9fee | 12 | ;;; Copyright © 2020 Greg Hogan <code@greghogan.com> |
c3ccba92 MB |
13 | ;;; |
14 | ;;; This file is part of GNU Guix. | |
15 | ;;; | |
16 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
17 | ;;; under the terms of the GNU General Public License as published by | |
18 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
19 | ;;; your option) any later version. | |
20 | ;;; | |
21 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
22 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
23 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
24 | ;;; GNU General Public License for more details. | |
25 | ;;; | |
26 | ;;; You should have received a copy of the GNU General Public License | |
27 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
28 | ||
29 | (define-module (gnu packages benchmark) | |
30 | #:use-module ((guix licenses) #:prefix license:) | |
31 | #:use-module (guix packages) | |
32 | #:use-module (guix download) | |
4b444fc5 | 33 | #:use-module (guix git-download) |
4c7e8c23 | 34 | #:use-module (guix build-system cmake) |
c3ccba92 | 35 | #:use-module (guix build-system gnu) |
5795f566 | 36 | #:use-module (guix build-system python) |
4c7e8c23 GB |
37 | #:use-module (gnu packages) |
38 | #:use-module (gnu packages check) | |
c3ccba92 | 39 | #:use-module (gnu packages compression) |
ac6fec05 MB |
40 | #:use-module (gnu packages linux) |
41 | #:use-module (gnu packages maths) | |
04717e94 | 42 | #:use-module (gnu packages mpi) |
176dd26b | 43 | #:use-module (gnu packages perl) |
aadead6f | 44 | #:use-module (gnu packages python) |
312ec128 | 45 | #:use-module (gnu packages python-science) |
5795f566 | 46 | #:use-module (gnu packages python-web) |
44d10b1f | 47 | #:use-module (gnu packages python-xyz) |
04717e94 DL |
48 | #:use-module (gnu packages storage) |
49 | #:use-module (ice-9 match)) | |
c3ccba92 MB |
50 | |
51 | (define-public fio | |
52 | (package | |
53 | (name "fio") | |
828b4a91 | 54 | (version "3.26") |
c3ccba92 MB |
55 | (source (origin |
56 | (method url-fetch) | |
2dffd9c6 | 57 | (uri (string-append "https://brick.kernel.dk/snaps/" |
b31e1561 | 58 | "fio-" version ".tar.bz2")) |
c3ccba92 MB |
59 | (sha256 |
60 | (base32 | |
828b4a91 | 61 | "1114h60vw63bim872an33xpvjfib6sc9dwj9xvk0yw41xjzfpp06")))) |
c3ccba92 MB |
62 | (build-system gnu-build-system) |
63 | (arguments | |
cf46d071 | 64 | '(#:test-target "test" |
c3ccba92 MB |
65 | #:phases |
66 | (modify-phases %standard-phases | |
ac6fec05 MB |
67 | (add-after |
68 | 'unpack 'patch-paths | |
69 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
70 | (let ((out (assoc-ref outputs "out")) | |
71 | (gnuplot (string-append (assoc-ref inputs "gnuplot") | |
72 | "/bin/gnuplot"))) | |
73 | (substitute* "tools/plot/fio2gnuplot" | |
74 | (("/usr/share/fio") (string-append out "/share/fio")) | |
75 | ;; FIXME (upstream): The 'gnuplot' executable is used inline | |
76 | ;; in various os.system() calls mixed with *.gnuplot filenames. | |
77 | (("; do gnuplot") (string-append "; do " gnuplot)) | |
78 | (("gnuplot mymath") (string-append gnuplot " mymath")) | |
79 | (("gnuplot mygraph") (string-append gnuplot " mygraph"))) | |
80 | #t))) | |
c3ccba92 MB |
81 | (replace 'configure |
82 | (lambda* (#:key outputs #:allow-other-keys) | |
83 | ;; The configure script doesn't understand some of the | |
84 | ;; GNU options, so we can't use #:configure-flags. | |
85 | (let ((out (assoc-ref outputs "out"))) | |
1cc3e26b TGR |
86 | (invoke "./configure" |
87 | (string-append "--prefix=" out)) | |
88 | #t))) | |
f125ec8e MB |
89 | ;; The main `fio` executable is fairly small and self contained. |
90 | ;; Moving the auxiliary python and gnuplot scripts to a separate | |
91 | ;; output saves almost 400 MiB on the closure. | |
92 | (add-after 'install 'move-outputs | |
93 | (lambda* (#:key outputs #:allow-other-keys) | |
94 | (let ((oldbin (string-append (assoc-ref outputs "out") "/bin")) | |
95 | (newbin (string-append (assoc-ref outputs "utils") "/bin"))) | |
96 | (mkdir-p newbin) | |
97 | (for-each (lambda (file) | |
98 | (let ((src (string-append oldbin "/" file)) | |
99 | (dst (string-append newbin "/" file))) | |
100 | (link src dst) | |
101 | (delete-file src))) | |
20d2e1fa MB |
102 | '("fio2gnuplot" "fiologparser_hist.py" |
103 | "fiologparser.py")) | |
f125ec8e MB |
104 | ;; Make sure numpy et.al is found. |
105 | (wrap-program (string-append newbin "/fiologparser_hist.py") | |
106 | `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))) | |
107 | #t)))))) | |
108 | (outputs '("out" "utils")) | |
c3ccba92 | 109 | (inputs |
aadead6f MB |
110 | `(("ceph" ,ceph "lib") |
111 | ("libaio" ,libaio) | |
ac6fec05 MB |
112 | ("gnuplot" ,gnuplot) |
113 | ("zlib" ,zlib) | |
114 | ("python-numpy" ,python2-numpy) | |
115 | ("python-pandas" ,python2-pandas) | |
116 | ("python" ,python-2))) | |
c3ccba92 MB |
117 | (home-page "https://github.com/axboe/fio") |
118 | (synopsis "Flexible I/O tester") | |
119 | (description | |
120 | "fio is a tool that will spawn a number of threads or processes doing a | |
121 | particular type of I/O action as specified by the user. The typical use of fio | |
122 | is to write a job file matching the I/O load one wants to simulate.") | |
123 | ;; The software is distributed under the GPL2, but a handful of components | |
124 | ;; are covered by other licenses. | |
125 | (license (list license:gpl2 license:gpl2+ license:bsd-2 | |
126 | license:public-domain)))) | |
04717e94 DL |
127 | |
128 | ;; Parameterized in anticipation of m(va)pich support | |
2d6f68aa | 129 | (define (intel-mpi-benchmarks mpi) |
04717e94 | 130 | (package |
2d6f68aa LC |
131 | (name (string-append "intel-mpi-benchmarks" |
132 | (if (string=? (package-name mpi) "openmpi") | |
133 | "" | |
134 | (string-append "-" (package-name mpi))))) | |
b9ab9fee | 135 | (version "2019.6") |
2d6f68aa LC |
136 | (source (origin |
137 | (method git-fetch) | |
138 | (uri (git-reference | |
b0e7b699 | 139 | (url "https://github.com/intel/mpi-benchmarks") |
2d6f68aa LC |
140 | (commit (string-append "IMB-v" version)))) |
141 | (file-name (git-file-name name version)) | |
142 | (sha256 | |
143 | (base32 | |
b9ab9fee GH |
144 | "02hxbk9g9nl59bk5qcfl3djj7b58vsqys340m1xdbyqwcrbnahh9")) |
145 | (modules '((guix build utils))) | |
146 | (snippet | |
147 | '(begin | |
148 | ;; Some source configuration files in the original tarball | |
149 | ;; have inappropriate execute permissions, which interferes | |
150 | ;; with the install phase below. | |
151 | (for-each (lambda (file) (chmod file #o444)) | |
152 | (find-files "WINDOWS" ".")) | |
153 | #t)))) | |
04717e94 DL |
154 | (build-system gnu-build-system) |
155 | (inputs | |
156 | `(("mpi" ,mpi))) | |
157 | (arguments | |
158 | `(#:phases | |
159 | (modify-phases %standard-phases | |
160 | (delete 'configure) | |
161 | (delete 'check) | |
04717e94 DL |
162 | (replace 'install |
163 | (lambda* (#:key outputs #:allow-other-keys) | |
2d6f68aa LC |
164 | (define (benchmark? file stat) |
165 | (and (string-prefix? "IMB-" (basename file)) | |
166 | (executable-file? file))) | |
167 | ||
04717e94 | 168 | (let* ((out (assoc-ref outputs "out")) |
04717e94 | 169 | (bin (string-append out "/bin"))) |
2d6f68aa LC |
170 | (for-each (lambda (file) |
171 | (install-file file bin)) | |
172 | (find-files "." benchmark?)) | |
173 | #t)))) | |
174 | ||
175 | ;; The makefile doesn't express all the dependencies, it seems. | |
176 | #:parallel-build? #t | |
177 | ||
178 | #:make-flags '("CC=mpicc" "CXX=mpicxx"))) | |
04717e94 | 179 | (home-page "https://software.intel.com/en-us/articles/intel-mpi-benchmarks") |
2d6f68aa | 180 | (synopsis "Benchmarks for the Message Passing Interface (MPI)") |
04717e94 DL |
181 | (description |
182 | "This package provides benchmarks for implementations of the @dfn{Message | |
183 | Passing Interface} (MPI). It contains MPI performance measurements for | |
184 | point-to-point and global communication, and file, operations for a range of | |
185 | message sizes. The generated benchmark data fully characterize: | |
186 | ||
187 | @itemize | |
188 | @item | |
189 | Performance of a cluster system, including node performance, network latency, | |
190 | and throughput; | |
191 | @item | |
192 | Efficiency of the MPI implementation. | |
193 | @end itemize") | |
194 | (license license:cpl1.0))) | |
195 | ||
2d6f68aa LC |
196 | (define-public intel-mpi-benchmarks/openmpi |
197 | (intel-mpi-benchmarks openmpi)) | |
198 | ||
199 | (define-public imb-openmpi | |
200 | (deprecated-package "imb-openmpi" intel-mpi-benchmarks/openmpi)) | |
61e265d2 RW |
201 | |
202 | (define-public multitime | |
203 | (package | |
204 | (name "multitime") | |
205 | (version "1.4") | |
206 | (source (origin | |
207 | (method url-fetch) | |
208 | (uri (string-append "https://tratt.net/laurie/src/" | |
209 | "multitime/releases/" | |
210 | "multitime-" version ".tar.gz")) | |
211 | (sha256 | |
212 | (base32 | |
213 | "0iyfsdrbyqa7a4ifrh19l9a48hgv7ld6m0d8yf9bkl12q0qw91fx")))) | |
214 | (build-system gnu-build-system) | |
215 | (arguments '(#:tests? #f)) ; there are no tests | |
216 | (home-page "https://tratt.net/laurie/src/multitime/") | |
217 | (synopsis "Time command execution over multiple executions") | |
218 | (description | |
219 | "The @code{time} utility is a simple and often effective way of measuring | |
220 | how long a command takes to run (wall time). Unfortunately, running a command | |
221 | once can give misleading timings. @code{multitime} is, in essence, a simple | |
222 | extension to @code{time} which runs a command multiple times and prints the | |
223 | timing means, standard deviations, mins, medians, and maxes having done so. | |
224 | This can give a much better understanding of the command's performance.") | |
225 | (license license:expat))) | |
4c7e8c23 GB |
226 | |
227 | (define-public benchmark | |
228 | (package | |
229 | (name "benchmark") | |
d1ecb3bd | 230 | (version "1.5.2") |
4c7e8c23 GB |
231 | (source (origin |
232 | (method git-fetch) | |
233 | (uri (git-reference | |
b0e7b699 | 234 | (url "https://github.com/google/benchmark") |
4c7e8c23 GB |
235 | (commit (string-append "v" version)))) |
236 | (file-name (git-file-name name version)) | |
237 | (sha256 | |
238 | (base32 | |
d1ecb3bd | 239 | "13rxagpzw6bal6ajlmrxlh9kgfvcixn6j734b2bvfqz7lch8n0pa")))) |
4c7e8c23 GB |
240 | (build-system cmake-build-system) |
241 | (native-inputs | |
d1ecb3bd MFG |
242 | `(("googletest-source" ,(package-source googletest)) |
243 | ("googletest" ,googletest))) | |
244 | (arguments | |
245 | `(#:phases | |
246 | (modify-phases %standard-phases | |
247 | (add-after 'unpack 'unpack-googletest | |
248 | (lambda* (#:key inputs #:allow-other-keys) | |
249 | (copy-recursively (assoc-ref inputs "googletest-source") | |
250 | "googletest") | |
251 | #t))))) | |
4c7e8c23 GB |
252 | (home-page "https://github.com/google/benchmark") |
253 | (synopsis "Microbenchmark support library") | |
254 | (description | |
d1ecb3bd MFG |
255 | "Benchmark is a library to benchmark code snippets, similar to unit |
256 | tests.") | |
4c7e8c23 | 257 | (license license:asl2.0))) |
176dd26b VL |
258 | |
259 | (define-public bonnie++ | |
260 | (package | |
261 | (name "bonnie++") | |
262 | (version "1.98") | |
263 | (source (origin | |
264 | (method url-fetch) | |
265 | (uri (string-append "https://www.coker.com.au/bonnie++/bonnie++-" | |
266 | version ".tgz")) | |
267 | (sha256 | |
268 | (base32 | |
269 | "010bmlmi0nrlp3aq7p624sfaj5a65lswnyyxk3cnz1bqig0cn2vf")))) | |
270 | (build-system gnu-build-system) | |
271 | (native-inputs | |
272 | `(("perl" ,perl))) | |
273 | (arguments '(#:tests? #f)) ; there are no tests | |
274 | (home-page "https://doc.coker.com.au/projects/bonnie/") | |
275 | (synopsis "Hard drive and file system benchmark suite") | |
276 | (description | |
277 | "Bonnie++ is a benchmark suite that is aimed at performing a number of | |
278 | simple tests of hard drive and file system performance. Bonnie++ allows you to | |
279 | benchmark how your file systems perform with respect to data read and write | |
280 | speed, the number of seeks that can be performed per second, and the number of | |
281 | file metadata operations that can be performed per second.") | |
282 | (license license:gpl2))) ;GPL 2 only, see copyright.txt | |
5795f566 MC |
283 | |
284 | (define-public python-locust | |
285 | (package | |
286 | (name "python-locust") | |
8999d2b4 | 287 | (version "1.4.3") |
5795f566 MC |
288 | (source |
289 | (origin | |
290 | (method url-fetch) | |
291 | (uri (pypi-uri "locust" version)) | |
292 | (sha256 | |
293 | (base32 | |
8999d2b4 | 294 | "0vmw151xcaznd2j85n96iyv9fniss0bkk91xn4maw2gwzym424xk")))) |
5795f566 MC |
295 | (build-system python-build-system) |
296 | (arguments | |
297 | `(#:phases | |
298 | (modify-phases %standard-phases | |
299 | (add-before 'check 'extend-PATH | |
300 | ;; Add the 'locust' script to PATH, which is used in the test | |
301 | ;; suite. | |
302 | (lambda* (#:key outputs #:allow-other-keys) | |
303 | (let ((out (assoc-ref outputs "out"))) | |
304 | (setenv "PATH" (string-append out "/bin:" | |
8999d2b4 | 305 | (getenv "PATH")))))) |
5795f566 MC |
306 | (replace 'check |
307 | (lambda _ | |
308 | (invoke "python" "-m" "pytest" | |
309 | "-k" (string-join | |
310 | (list | |
311 | ;; These tests return "non-zero exit status 1". | |
312 | "not test_default_headless_spawn_options" | |
313 | "not test_default_headless_spawn_options_with_shape" | |
314 | "not test_headless_spawn_options_wo_run_time" | |
8999d2b4 MC |
315 | ;; These tests depend on networking. |
316 | "not test_html_report_option" | |
5795f566 MC |
317 | "not test_web_options" |
318 | ;; This test fails because of the warning "System open | |
319 | ;; file limit '1024' is below minimum setting '10000'". | |
8999d2b4 MC |
320 | "not test_skip_logging" |
321 | ;; On some (slow?) machines, the following tests | |
322 | ;; fail, with the processes returning exit code | |
323 | ;; -15 instead of the expected 42 and 0, | |
324 | ;; respectively (see: | |
325 | ;; https://github.com/locustio/locust/issues/1708). | |
326 | "not test_custom_exit_code" | |
327 | "not test_webserver") " and "))))))) | |
5795f566 MC |
328 | (propagated-inputs |
329 | `(("python-configargparse" ,python-configargparse) | |
330 | ("python-flask" ,python-flask) | |
331 | ("python-flask-basicauth" ,python-flask-basicauth) | |
332 | ("python-gevent" ,python-gevent) | |
333 | ("python-geventhttpclient" ,python-geventhttpclient) | |
334 | ("python-msgpack" ,python-msgpack) | |
335 | ("python-psutil" ,python-psutil) | |
336 | ("python-pyzmq" ,python-pyzmq) | |
337 | ("python-requests" ,python-requests) | |
338 | ("python-werkzeug" ,python-werkzeug))) | |
339 | (native-inputs | |
340 | `(("python-mock" ,python-mock) | |
341 | ("python-pyquery" ,python-pyquery) | |
342 | ("python-pytest" ,python-pytest))) ;for more easily skipping tests | |
343 | (home-page "https://locust.io/") | |
344 | (synopsis "Distributed load testing framework") | |
345 | (description "Locust is a performance testing tool that aims to be easy to | |
346 | use, scriptable and scalable. The test scenarios are described in plain | |
347 | Python. It provides a web-based user interface to visualize the results in | |
348 | real-time, but can also be run non-interactively. Locust is primarily geared | |
349 | toward testing HTTP-based applications or services, but it can be customized to | |
8999d2b4 MC |
350 | test any system or protocol. |
351 | ||
352 | Note: Locust will complain if the available open file descriptors limit for | |
353 | the user is too low. To raise such limit on a Guix System, refer to | |
354 | @samp{info guix --index-search=pam-limits-service}.") | |
5795f566 | 355 | (license license:expat))) |