Commit | Line | Data |
---|---|---|
c3ccba92 | 1 | ;;; GNU Guix --- Functional package management for GNU |
5e7c2eb7 | 2 | ;;; Copyright © 2016, 2017, 2021 Marius Bakke <marius@gnu.org> |
04717e94 | 3 | ;;; Copyright © 2017 Dave Love <fx@gnu.org> |
140d4f21 | 4 | ;;; Copyright © 2018–2022 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> |
c82b3749 | 8 | ;;; Copyright © 2019, 2021 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> |
0b0b377d | 11 | ;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
b9ab9fee | 12 | ;;; Copyright © 2020 Greg Hogan <code@greghogan.com> |
fb8baf0c | 13 | ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net> |
c3ccba92 MB |
14 | ;;; |
15 | ;;; This file is part of GNU Guix. | |
16 | ;;; | |
17 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
18 | ;;; under the terms of the GNU General Public License as published by | |
19 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
20 | ;;; your option) any later version. | |
21 | ;;; | |
22 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
23 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
25 | ;;; GNU General Public License for more details. | |
26 | ;;; | |
27 | ;;; You should have received a copy of the GNU General Public License | |
28 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
29 | ||
30 | (define-module (gnu packages benchmark) | |
31 | #:use-module ((guix licenses) #:prefix license:) | |
32 | #:use-module (guix packages) | |
33 | #:use-module (guix download) | |
0b0b377d | 34 | #:use-module (guix gexp) |
4b444fc5 | 35 | #:use-module (guix git-download) |
4c7e8c23 | 36 | #:use-module (guix build-system cmake) |
c3ccba92 | 37 | #:use-module (guix build-system gnu) |
5795f566 | 38 | #:use-module (guix build-system python) |
4c7e8c23 | 39 | #:use-module (gnu packages) |
c886968b MC |
40 | #:use-module (gnu packages autotools) |
41 | #:use-module (gnu packages base) | |
92121b8e | 42 | #:use-module (gnu packages bash) |
c886968b | 43 | #:use-module (gnu packages c) |
4c7e8c23 | 44 | #:use-module (gnu packages check) |
c3ccba92 | 45 | #:use-module (gnu packages compression) |
c886968b MC |
46 | #:use-module (gnu packages databases) |
47 | #:use-module (gnu packages docbook) | |
92121b8e | 48 | #:use-module (gnu packages kde-frameworks) |
ac6fec05 | 49 | #:use-module (gnu packages linux) |
c886968b | 50 | #:use-module (gnu packages lua) |
ac6fec05 | 51 | #:use-module (gnu packages maths) |
04717e94 | 52 | #:use-module (gnu packages mpi) |
842d27fd | 53 | #:use-module (gnu packages opencl) |
176dd26b | 54 | #:use-module (gnu packages perl) |
92121b8e | 55 | #:use-module (gnu packages php) |
c886968b | 56 | #:use-module (gnu packages pkg-config) |
aadead6f | 57 | #:use-module (gnu packages python) |
ed210c1b | 58 | #:use-module (gnu packages python-build) |
312ec128 | 59 | #:use-module (gnu packages python-science) |
5795f566 | 60 | #:use-module (gnu packages python-web) |
44d10b1f | 61 | #:use-module (gnu packages python-xyz) |
0b0b377d | 62 | #:use-module (gnu packages qt) |
c886968b | 63 | #:use-module (gnu packages xml) |
04717e94 | 64 | #:use-module (ice-9 match)) |
c3ccba92 | 65 | |
1f50c875 MC |
66 | ;; Lazily resolve the gcc-toolchain to avoid a circular dependency. Always |
67 | ;; use the latest available toolchain to avoid conflicts in user profiles. | |
92121b8e MC |
68 | (define gcc-toolchain* |
69 | (delay (module-ref (resolve-interface '(gnu packages commencement)) | |
1f50c875 | 70 | 'gcc-toolchain-12))) |
92121b8e | 71 | |
c3ccba92 MB |
72 | (define-public fio |
73 | (package | |
74 | (name "fio") | |
dbfadac3 | 75 | (version "3.31") |
c3ccba92 MB |
76 | (source (origin |
77 | (method url-fetch) | |
2dffd9c6 | 78 | (uri (string-append "https://brick.kernel.dk/snaps/" |
b31e1561 | 79 | "fio-" version ".tar.bz2")) |
c3ccba92 MB |
80 | (sha256 |
81 | (base32 | |
dbfadac3 | 82 | "03x0n18f2wsyjh6qv57kvgqcwga54rzngwzr6fzlrjsalqw7mxlp")))) |
c3ccba92 MB |
83 | (build-system gnu-build-system) |
84 | (arguments | |
3d84a729 TGR |
85 | (list #:modules |
86 | `(,@%gnu-build-system-modules | |
87 | (ice-9 textual-ports)) | |
88 | #:test-target "test" | |
89 | #:configure-flags | |
90 | #~(list "--disable-native") ;don't generate code for the build CPU | |
91 | #:phases | |
92 | #~(modify-phases %standard-phases | |
93 | (replace 'configure | |
94 | (lambda* (#:key (configure-flags ''()) #:allow-other-keys) | |
95 | ;; The configure script doesn't understand some of the | |
96 | ;; GNU options, so we can't use the stock phase. | |
97 | (apply invoke "./configure" | |
98 | (string-append "--prefix=" #$output) | |
99 | configure-flags))) | |
100 | ;; The main `fio` executable is fairly small and self contained. | |
101 | ;; Moving the auxiliary scripts to a separate output saves ~100 MiB | |
102 | ;; on the closure. | |
103 | (add-after 'install 'move-outputs | |
104 | (lambda _ | |
105 | (let ((oldbin (string-append #$output "/bin")) | |
106 | (newbin (string-append #$output:utils "/bin")) | |
107 | (script? (lambda* (file #:rest _) | |
108 | (call-with-input-file file | |
109 | (lambda (port) | |
110 | (char=? #\# (peek-char port))))))) | |
111 | (mkdir-p newbin) | |
112 | (for-each (lambda (file) | |
113 | (link file (string-append newbin "/" (basename file))) | |
114 | (delete-file file)) | |
115 | (find-files oldbin script?)))))))) | |
f125ec8e | 116 | (outputs '("out" "utils")) |
c3ccba92 | 117 | (inputs |
8394619b | 118 | (list libaio python zlib)) |
c3ccba92 MB |
119 | (home-page "https://github.com/axboe/fio") |
120 | (synopsis "Flexible I/O tester") | |
121 | (description | |
122 | "fio is a tool that will spawn a number of threads or processes doing a | |
123 | particular type of I/O action as specified by the user. The typical use of fio | |
124 | is to write a job file matching the I/O load one wants to simulate.") | |
125 | ;; The software is distributed under the GPL2, but a handful of components | |
126 | ;; are covered by other licenses. | |
127 | (license (list license:gpl2 license:gpl2+ license:bsd-2 | |
128 | license:public-domain)))) | |
04717e94 | 129 | |
c82b3749 | 130 | (define-public intel-mpi-benchmarks/openmpi |
04717e94 | 131 | (package |
c82b3749 | 132 | (name "intel-mpi-benchmarks") |
b9ab9fee | 133 | (version "2019.6") |
2d6f68aa LC |
134 | (source (origin |
135 | (method git-fetch) | |
136 | (uri (git-reference | |
b0e7b699 | 137 | (url "https://github.com/intel/mpi-benchmarks") |
2d6f68aa LC |
138 | (commit (string-append "IMB-v" version)))) |
139 | (file-name (git-file-name name version)) | |
140 | (sha256 | |
141 | (base32 | |
b9ab9fee GH |
142 | "02hxbk9g9nl59bk5qcfl3djj7b58vsqys340m1xdbyqwcrbnahh9")) |
143 | (modules '((guix build utils))) | |
144 | (snippet | |
145 | '(begin | |
146 | ;; Some source configuration files in the original tarball | |
147 | ;; have inappropriate execute permissions, which interferes | |
148 | ;; with the install phase below. | |
149 | (for-each (lambda (file) (chmod file #o444)) | |
150 | (find-files "WINDOWS" ".")) | |
151 | #t)))) | |
04717e94 DL |
152 | (build-system gnu-build-system) |
153 | (inputs | |
8394619b | 154 | (list openmpi)) |
04717e94 DL |
155 | (arguments |
156 | `(#:phases | |
157 | (modify-phases %standard-phases | |
158 | (delete 'configure) | |
159 | (delete 'check) | |
04717e94 DL |
160 | (replace 'install |
161 | (lambda* (#:key outputs #:allow-other-keys) | |
2d6f68aa LC |
162 | (define (benchmark? file stat) |
163 | (and (string-prefix? "IMB-" (basename file)) | |
164 | (executable-file? file))) | |
165 | ||
04717e94 | 166 | (let* ((out (assoc-ref outputs "out")) |
04717e94 | 167 | (bin (string-append out "/bin"))) |
2d6f68aa LC |
168 | (for-each (lambda (file) |
169 | (install-file file bin)) | |
170 | (find-files "." benchmark?)) | |
171 | #t)))) | |
172 | ||
173 | ;; The makefile doesn't express all the dependencies, it seems. | |
174 | #:parallel-build? #t | |
175 | ||
176 | #:make-flags '("CC=mpicc" "CXX=mpicxx"))) | |
04717e94 | 177 | (home-page "https://software.intel.com/en-us/articles/intel-mpi-benchmarks") |
2d6f68aa | 178 | (synopsis "Benchmarks for the Message Passing Interface (MPI)") |
04717e94 DL |
179 | (description |
180 | "This package provides benchmarks for implementations of the @dfn{Message | |
181 | Passing Interface} (MPI). It contains MPI performance measurements for | |
182 | point-to-point and global communication, and file, operations for a range of | |
183 | message sizes. The generated benchmark data fully characterize: | |
184 | ||
185 | @itemize | |
186 | @item | |
187 | Performance of a cluster system, including node performance, network latency, | |
188 | and throughput; | |
189 | @item | |
190 | Efficiency of the MPI implementation. | |
191 | @end itemize") | |
192 | (license license:cpl1.0))) | |
193 | ||
61e265d2 RW |
194 | (define-public multitime |
195 | (package | |
196 | (name "multitime") | |
197 | (version "1.4") | |
198 | (source (origin | |
199 | (method url-fetch) | |
200 | (uri (string-append "https://tratt.net/laurie/src/" | |
201 | "multitime/releases/" | |
202 | "multitime-" version ".tar.gz")) | |
203 | (sha256 | |
204 | (base32 | |
205 | "0iyfsdrbyqa7a4ifrh19l9a48hgv7ld6m0d8yf9bkl12q0qw91fx")))) | |
206 | (build-system gnu-build-system) | |
207 | (arguments '(#:tests? #f)) ; there are no tests | |
208 | (home-page "https://tratt.net/laurie/src/multitime/") | |
209 | (synopsis "Time command execution over multiple executions") | |
210 | (description | |
211 | "The @code{time} utility is a simple and often effective way of measuring | |
212 | how long a command takes to run (wall time). Unfortunately, running a command | |
213 | once can give misleading timings. @code{multitime} is, in essence, a simple | |
214 | extension to @code{time} which runs a command multiple times and prints the | |
215 | timing means, standard deviations, mins, medians, and maxes having done so. | |
216 | This can give a much better understanding of the command's performance.") | |
217 | (license license:expat))) | |
4c7e8c23 GB |
218 | |
219 | (define-public benchmark | |
220 | (package | |
221 | (name "benchmark") | |
90b86970 | 222 | (version "1.5.6") |
4c7e8c23 GB |
223 | (source (origin |
224 | (method git-fetch) | |
225 | (uri (git-reference | |
b0e7b699 | 226 | (url "https://github.com/google/benchmark") |
4c7e8c23 GB |
227 | (commit (string-append "v" version)))) |
228 | (file-name (git-file-name name version)) | |
229 | (sha256 | |
230 | (base32 | |
90b86970 | 231 | "030g4d8vpn2442dsap0qw86lsw7xfl36k0x0x9bn0vvm11qvjn8c")))) |
4c7e8c23 GB |
232 | (build-system cmake-build-system) |
233 | (native-inputs | |
d1ecb3bd MFG |
234 | `(("googletest-source" ,(package-source googletest)) |
235 | ("googletest" ,googletest))) | |
236 | (arguments | |
237 | `(#:phases | |
238 | (modify-phases %standard-phases | |
239 | (add-after 'unpack 'unpack-googletest | |
240 | (lambda* (#:key inputs #:allow-other-keys) | |
241 | (copy-recursively (assoc-ref inputs "googletest-source") | |
90b86970 | 242 | "googletest")))))) |
4c7e8c23 GB |
243 | (home-page "https://github.com/google/benchmark") |
244 | (synopsis "Microbenchmark support library") | |
245 | (description | |
d1ecb3bd MFG |
246 | "Benchmark is a library to benchmark code snippets, similar to unit |
247 | tests.") | |
4c7e8c23 | 248 | (license license:asl2.0))) |
176dd26b VL |
249 | |
250 | (define-public bonnie++ | |
251 | (package | |
252 | (name "bonnie++") | |
253 | (version "1.98") | |
254 | (source (origin | |
255 | (method url-fetch) | |
256 | (uri (string-append "https://www.coker.com.au/bonnie++/bonnie++-" | |
257 | version ".tgz")) | |
258 | (sha256 | |
259 | (base32 | |
260 | "010bmlmi0nrlp3aq7p624sfaj5a65lswnyyxk3cnz1bqig0cn2vf")))) | |
261 | (build-system gnu-build-system) | |
262 | (native-inputs | |
8394619b | 263 | (list perl)) |
176dd26b VL |
264 | (arguments '(#:tests? #f)) ; there are no tests |
265 | (home-page "https://doc.coker.com.au/projects/bonnie/") | |
266 | (synopsis "Hard drive and file system benchmark suite") | |
267 | (description | |
268 | "Bonnie++ is a benchmark suite that is aimed at performing a number of | |
269 | simple tests of hard drive and file system performance. Bonnie++ allows you to | |
270 | benchmark how your file systems perform with respect to data read and write | |
271 | speed, the number of seeks that can be performed per second, and the number of | |
272 | file metadata operations that can be performed per second.") | |
273 | (license license:gpl2))) ;GPL 2 only, see copyright.txt | |
5795f566 | 274 | |
92121b8e MC |
275 | (define-public phoronix-test-suite |
276 | (package | |
277 | (name "phoronix-test-suite") | |
32ac1464 | 278 | (version "10.8.4") |
92121b8e MC |
279 | (source |
280 | (origin | |
281 | (method url-fetch) | |
282 | (uri (string-append "https://phoronix-test-suite.com/releases/" | |
283 | name "-" version ".tar.gz")) | |
448deee2 MC |
284 | (modules '((guix build utils) |
285 | (ice-9 ftw) | |
286 | (ice-9 regex) | |
287 | (srfi srfi-26))) | |
288 | (snippet | |
289 | '(begin | |
290 | ;; Many test profiles have their license identified as "Free", | |
291 | ;; while they are in fact non-free (see: | |
292 | ;; https://github.com/phoronix-test-suite/phoronix-test-suite/issues/667). | |
293 | (define problems ;see: | |
294 | '("bioshock-infinite-1" ;mis-licensed as free | |
295 | "firefox" ;not FSDG-compliant | |
296 | "dirt-rally" ;mis-licensed as free | |
297 | "dirt-showdown" ;mis-licensed as free | |
298 | "dota2" ;mis-licensed as free | |
299 | "dow3" ;mis-licensed as free | |
300 | "etqw-demo" ;mis-licensed as free | |
301 | "f12015" ;mis-licensed as free | |
302 | "f12017" ;mis-licensed as free | |
303 | "geexlab" ;mis-licensed as free | |
304 | "gfxbench" ;mis-licensed as free | |
305 | "gnupg" ;downloads ubuntu image | |
306 | "hitman-1" ;mis-licensed as free | |
307 | "hl2lostcoast" ;mis-licensed as free | |
308 | "linux" ;contains blobs | |
309 | "madmax" ;mis-licensed as free | |
310 | "metro" ;mis-licensed as free | |
311 | "minion" ;mis-licensed as free | |
312 | "sam2017" ;mis-licensed as free | |
313 | "talos-principle" ;mis-licensed as free | |
314 | "tomb-raider" ;mis-licensed as free | |
315 | "tf2" ;mis-licensed as free | |
316 | "ue4" ;mis-licensed as free | |
317 | "unigine" ;mis-licensed as free | |
318 | "ut2004")) ;mis-licensed as free | |
319 | ||
320 | (define rx (format #f "(~a)" (string-join problems "|"))) | |
321 | ||
322 | (define (mark-as-non-free directory) | |
323 | (format #t "Marking ~s as non-free...~%" directory) | |
324 | (substitute* (find-files directory "^(test|suite)-definition.xml$") | |
325 | (("Free") | |
326 | "Non-free"))) | |
327 | ||
328 | (with-directory-excursion "ob-cache/test-profiles/pts" | |
329 | (for-each (cut mark-as-non-free <>) | |
330 | (scandir "." (cut string-match rx <>)))))) | |
92121b8e MC |
331 | (sha256 |
332 | (base32 | |
32ac1464 | 333 | "1x5pyzzn7ipi0ia1xlvq3bpw0rgf7h7sbr2kzhz1k8y06var480z")) |
92121b8e MC |
334 | (patches (search-patches "phoronix-test-suite-fsdg.patch")))) |
335 | (arguments | |
336 | (list | |
337 | #:tests? #f ;no test suite | |
338 | #:phases | |
339 | #~(modify-phases %standard-phases | |
340 | (delete 'configure) | |
341 | (delete 'build) | |
342 | (replace 'install | |
343 | (lambda _ | |
344 | (invoke "./install-sh" #$output "--free-software-only"))) | |
345 | (add-after 'install 'wrap-binary | |
346 | (lambda* (#:key inputs #:allow-other-keys) | |
347 | (let ((pts (string-append #$output "/bin/phoronix-test-suite"))) | |
348 | (wrap-program pts | |
349 | (list "PATH" 'prefix | |
350 | (map (lambda (binary) | |
351 | (dirname (search-input-file | |
352 | inputs (string-append "bin/" binary)))) | |
353 | '("bash" "cat" ;coreutils | |
354 | "gzip" "make" "php" "sed" "tar" "which")))))))))) | |
355 | (build-system gnu-build-system) | |
356 | (native-inputs (list python which)) | |
357 | ;; Wrap the most basic build tools needed by Phoronix Test Suite to build | |
358 | ;; simple tests such as 'fio'. | |
359 | (inputs (list bash coreutils gnu-make gzip php sed tar which)) | |
360 | ;; Phoronix Test Suite builds and caches the benchmarking tools itself; | |
361 | ;; the user is required to manually install extra libraries depending on | |
362 | ;; the selected test; but at least a working C/C++ toolchain is assumed to | |
363 | ;; be available. | |
364 | (propagated-inputs (list (force gcc-toolchain*))) | |
365 | (home-page "https://www.phoronix-test-suite.com/") | |
366 | (synopsis "Automated testing/benchmarking software") | |
367 | (description | |
368 | "The Phoronix Test Suite is a comprehensive testing and benchmarking platform | |
369 | that provides an extensible framework for which new tests can be easily added. | |
370 | It can carry out both qualitative and quantitative benchmarks in a clean, | |
371 | reproducible, and easy-to-use manner, making it easy to compare one particular | |
372 | setup against another one.") | |
373 | (license license:gpl3+))) | |
374 | ||
5795f566 MC |
375 | (define-public python-locust |
376 | (package | |
377 | (name "python-locust") | |
ece8e759 | 378 | (version "2.8.6") |
5795f566 MC |
379 | (source |
380 | (origin | |
381 | (method url-fetch) | |
382 | (uri (pypi-uri "locust" version)) | |
383 | (sha256 | |
384 | (base32 | |
ece8e759 | 385 | "1gn13j758j36knlcdyyyggn60rpw98iqdkvl3kjsz34brysic6q1")))) |
5795f566 MC |
386 | (build-system python-build-system) |
387 | (arguments | |
8d70f509 | 388 | '(#:phases |
5795f566 | 389 | (modify-phases %standard-phases |
ece8e759 MC |
390 | (add-after 'unpack 'relax-requirements |
391 | (lambda _ | |
392 | (substitute* "setup.py" | |
393 | (("setuptools_scm<=6.0.1") | |
394 | "setuptools_scm") | |
395 | (("Jinja2<3.1.0") | |
396 | "Jinja2")))) | |
5795f566 | 397 | (replace 'check |
8d70f509 MB |
398 | (lambda* (#:key tests? #:allow-other-keys) |
399 | (when tests? | |
400 | (invoke "python" "-m" "pytest" "locust" | |
401 | "-k" (string-join | |
402 | '(;; These tests return "non-zero exit status 1". | |
403 | "not test_default_headless_spawn_options" | |
404 | "not test_default_headless_spawn_options_with_shape" | |
405 | "not test_headless_spawn_options_wo_run_time" | |
406 | ;; These tests depend on networking. | |
407 | "not test_html_report_option" | |
408 | "not test_web_options" | |
409 | ;; This test fails because of the warning "System open | |
410 | ;; file limit '1024' is below minimum setting '10000'". | |
411 | "not test_skip_logging" | |
412 | ;; On some (slow?) machines, the following tests | |
413 | ;; fail, with the processes returning exit code | |
414 | ;; -15 instead of the expected 42 and 0, | |
415 | ;; respectively (see: | |
416 | ;; https://github.com/locustio/locust/issues/1708). | |
417 | "not test_custom_exit_code" | |
ece8e759 MC |
418 | "not test_webserver" |
419 | ;; This test fails with "AssertionError: | |
420 | ;; 'stopped' != 'stopping'". | |
421 | "not test_distributed_shape") " and ")))))))) | |
5795f566 | 422 | (propagated-inputs |
8394619b LC |
423 | (list python-configargparse |
424 | python-flask | |
425 | python-flask-basicauth | |
8d70f509 | 426 | python-flask-cors |
8394619b LC |
427 | python-gevent |
428 | python-geventhttpclient | |
ece8e759 | 429 | python-jinja2 |
8394619b LC |
430 | python-msgpack |
431 | python-psutil | |
432 | python-pyzmq | |
433 | python-requests | |
8d70f509 MB |
434 | python-roundrobin |
435 | python-typing-extensions | |
8394619b | 436 | python-werkzeug)) |
5795f566 | 437 | (native-inputs |
ece8e759 MC |
438 | (list python-mock |
439 | python-pyquery | |
440 | python-pytest | |
441 | python-retry | |
442 | python-setuptools-scm)) | |
5795f566 MC |
443 | (home-page "https://locust.io/") |
444 | (synopsis "Distributed load testing framework") | |
445 | (description "Locust is a performance testing tool that aims to be easy to | |
446 | use, scriptable and scalable. The test scenarios are described in plain | |
447 | Python. It provides a web-based user interface to visualize the results in | |
448 | real-time, but can also be run non-interactively. Locust is primarily geared | |
449 | toward testing HTTP-based applications or services, but it can be customized to | |
8999d2b4 MC |
450 | test any system or protocol. |
451 | ||
452 | Note: Locust will complain if the available open file descriptors limit for | |
453 | the user is too low. To raise such limit on a Guix System, refer to | |
454 | @samp{info guix --index-search=pam-limits-service}.") | |
5795f566 | 455 | (license license:expat))) |
fb8baf0c AI |
456 | |
457 | (define-public interbench | |
458 | (package | |
459 | (name "interbench") | |
460 | (version "0.31") | |
461 | (source | |
462 | (origin | |
463 | (method git-fetch) | |
464 | (uri (git-reference | |
465 | (url "https://github.com/ckolivas/interbench") | |
466 | (commit (string-append "v" version)))) | |
467 | (file-name (git-file-name name version)) | |
468 | (sha256 | |
469 | (base32 | |
470 | "0ifnw8vnkcgrksx7g5d9ii4kjppqnk32lvrybdybmibyvag6zfdc")))) | |
471 | (build-system gnu-build-system) | |
472 | (arguments | |
473 | `(#:tests? #f ; no tests | |
474 | #:phases | |
475 | (modify-phases %standard-phases | |
476 | (add-after 'unpack 'fix-broken-makefile | |
477 | (lambda _ | |
478 | ;; Remove erroneous "-lm" target | |
479 | (substitute* "Makefile" | |
480 | (("hackbench.o -lm") "hackbench.o")))) | |
481 | (delete 'configure) | |
482 | (replace 'install | |
483 | (lambda* (#:key outputs #:allow-other-keys) | |
484 | (let ((out (assoc-ref outputs "out"))) | |
485 | (install-file "interbench" (string-append out "/bin")) | |
486 | (install-file "interbench.8" (string-append out "/share/man/man8")))))))) | |
487 | (home-page "http://users.on.net/~ckolivas/interbench/") | |
488 | (synopsis "Interactivity benchmark") | |
489 | (description "interbench is designed to benchmark interactivity on Linux. | |
490 | It is designed to measure the effect of changes in Linux kernel design or | |
491 | system configuration changes such as CPU, I/O scheduler and filesystem changes | |
492 | and options. With careful benchmarking, different hardware can be compared.") | |
493 | (license license:gpl2+))) | |
842d27fd LDB |
494 | |
495 | (define-public clpeak | |
496 | ;; Release 1.1.0 is too old for our opencl-clhpp. This commit supports | |
497 | ;; cl2.hpp. | |
498 | (let ((commit "6d59cb64997a53c35207b77a63d2e9f0e84de5fd")) | |
499 | (package | |
500 | (name "clpeak") | |
501 | (version (git-version "1.1.0" "0" commit)) | |
502 | (source (origin | |
503 | (method git-fetch) | |
504 | (uri (git-reference | |
505 | (url "https://github.com/krrishnarraj/clpeak.git") | |
506 | (commit commit))) | |
507 | (file-name (git-file-name name version)) | |
508 | (sha256 | |
509 | (base32 | |
510 | "0qmhdjyhwl7gfgyqxsddqn6zpp3b57503m16h7jv6illy3lfvji1")))) | |
511 | (build-system cmake-build-system) | |
512 | (home-page "https://github.com/krrishnarraj/clpeak") | |
513 | (inputs | |
8394619b | 514 | (list opencl-clhpp opencl-icd-loader)) |
842d27fd LDB |
515 | (synopsis "OpenCL benchmark tool") |
516 | (description | |
517 | "A synthetic benchmarking tool to measure peak capabilities of OpenCL | |
518 | devices. It only measures the peak metrics that can be achieved using | |
519 | vector operations and does not represent a real-world use case.") | |
520 | (license license:unlicense)))) | |
0b0b377d MC |
521 | |
522 | (define-public kdiskmark | |
523 | (package | |
524 | (name "kdiskmark") | |
525 | (version "2.3.0") | |
526 | (source (origin | |
527 | (method git-fetch) | |
528 | (uri (git-reference | |
529 | (url "https://github.com/JonMagon/KDiskMark") | |
530 | (commit version))) | |
531 | (file-name (git-file-name name version)) | |
532 | (sha256 | |
533 | (base32 | |
534 | "1l4sw05yx70pcnaa64arjc414mgvyz05pn3gz9nc9hga8v2d3rzn")))) | |
535 | (build-system cmake-build-system) | |
536 | (arguments | |
537 | (list | |
538 | #:configure-flags | |
539 | ;; Drop runtime dependency on KDE's KFAuth. | |
540 | #~(list "-DPERFORM_PAGECACHE_CLEARING_USING_KF5AUTH=no") | |
541 | #:tests? #f ;no test suite | |
542 | #:phases | |
543 | #~(modify-phases %standard-phases | |
544 | (add-after 'unpack 'patch-paths | |
545 | (lambda* (#:key inputs #:allow-other-keys) | |
546 | (substitute* "src/benchmark.cpp" | |
547 | (("\"fio\"") | |
548 | (format #f "~s" (search-input-file inputs "bin/fio"))))))))) | |
eef8e2ec | 549 | (native-inputs (list extra-cmake-modules qttools-5)) |
0b0b377d MC |
550 | (inputs (list fio qtbase-5)) |
551 | (home-page "https://github.com/JonMagon/KDiskMark") | |
552 | (synopsis "Simple disk benchmark tool") | |
553 | (description "KDiskMark is an HDD and SSD benchmark tool. KDiskMark | |
554 | abstracts away the complexity of the Flexible I/O Tester (@command{fio}) | |
555 | command via a convenient graphical user interface (GUI) and handles its output | |
556 | to provide an easy to view and interpret benchmark result. The application is | |
557 | written in C++ with Qt and doesn't have any runtime KDE dependencies. Among | |
558 | its features are: | |
559 | @itemize | |
560 | @item Configurable block size, queues, and threads count for each test | |
561 | @item Many languages support | |
562 | @item Report generation. | |
563 | @end itemize") | |
564 | (license license:gpl3+))) | |
c886968b MC |
565 | |
566 | (define-public sysbench | |
567 | (package | |
568 | (name "sysbench") | |
569 | (version "1.0.20") | |
570 | (source (origin | |
571 | (method git-fetch) | |
572 | (uri (git-reference | |
573 | (url "https://github.com/akopytov/sysbench") | |
574 | (commit version))) | |
575 | (file-name (git-file-name name version)) | |
576 | (modules '((guix build utils))) | |
577 | (snippet '(begin | |
578 | ;; Ensure no bundled libraries get used. | |
579 | (delete-file-recursively "third_party") | |
580 | (substitute* "configure.ac" | |
581 | (("^third_party/.*") | |
582 | "")) | |
583 | (substitute* "Makefile.am" | |
584 | ((".*(LUAJIT|CK)_DIR =.*") | |
585 | "")))) | |
586 | (sha256 | |
587 | (base32 | |
588 | "1sanvl2a52ff4shj62nw395zzgdgywplqvwip74ky8q7s6qjf5qy")))) | |
589 | (build-system gnu-build-system) | |
590 | (arguments | |
591 | (list | |
592 | #:configure-flags #~(list "--with-pgsql" | |
593 | ;; Explicitly specify the library directory of | |
594 | ;; MySQL, otherwise `mysql_config` gets | |
595 | ;; consulted and adds unnecessary link | |
596 | ;; directives. | |
597 | (string-append "--with-mysql-libs=" | |
598 | #$(this-package-input "mysql") | |
599 | "/lib") | |
600 | "--with-system-luajit" | |
601 | "--with-system-ck" | |
602 | ;; If we let the build tool select the most | |
603 | ;; optimal compiler architecture flag, the | |
604 | ;; build is not reproducible. | |
605 | "--without-gcc-arch") | |
606 | #:phases #~(modify-phases %standard-phases | |
607 | (add-after 'unpack 'patch-test-runner | |
608 | (lambda _ | |
609 | (substitute* "tests/test_run.sh" | |
610 | (("/bin/bash") | |
611 | (which "bash")) | |
612 | ;; Do not attempt to invoke the cram command via | |
613 | ;; Python, as on Guix it is a shell script (wrapper). | |
614 | (("\\$\\(command -v cram\\)") | |
615 | "-m cram")))) | |
616 | (add-after 'unpack 'disable-test-installation | |
617 | (lambda _ | |
618 | (substitute* "tests/Makefile.am" | |
619 | (("install-data-local") | |
620 | "do-not-install-data-local") | |
621 | (("^test_SCRIPTS.*") | |
622 | "")))) | |
623 | (add-after 'unpack 'fix-docbook | |
624 | (lambda* (#:key native-inputs inputs #:allow-other-keys) | |
625 | (substitute* "m4/ax_check_docbook.m4" | |
626 | (("DOCBOOK_ROOT=.*" all) | |
627 | (string-append | |
628 | all "XML_CATALOG=" | |
629 | (search-input-file (or native-inputs inputs) | |
630 | "xml/dtd/docbook/catalog.xml") | |
631 | "\n"))) | |
632 | (substitute* "doc/xsl/xhtml.xsl" | |
633 | (("http://docbook.sourceforge.net/release/xsl\ | |
634 | /current/xhtml/docbook.xsl") | |
635 | (search-input-file | |
636 | (or native-inputs inputs) | |
637 | (string-append "xml/xsl/docbook-xsl-" | |
638 | #$(package-version docbook-xsl) | |
639 | "/xhtml/docbook.xsl")))) | |
640 | (substitute* "doc/xsl/xhtml-chunk.xsl" | |
641 | (("http://docbook.sourceforge.net/release/xsl\ | |
642 | /current/xhtml/chunk.xsl") | |
643 | (search-input-file | |
644 | (or native-inputs inputs) | |
645 | (string-append "xml/xsl/docbook-xsl-" | |
646 | #$(package-version docbook-xsl) | |
647 | "/xhtml/chunk.xsl"))))))))) | |
648 | (native-inputs (list autoconf | |
649 | automake | |
650 | libtool | |
651 | pkg-config | |
652 | python-cram | |
653 | python-wrapper | |
654 | which | |
655 | ;; For documentation | |
656 | libxml2 ;for XML_CATALOG_FILES | |
657 | libxslt | |
658 | docbook-xml | |
659 | docbook-xsl)) | |
660 | (inputs (list ck libaio luajit mysql postgresql)) | |
661 | (home-page "https://github.com/akopytov/sysbench/") | |
662 | (synopsis "Scriptable database and system performance benchmark") | |
663 | (description "@command{sysbench} is a scriptable multi-threaded benchmark | |
664 | tool based on LuaJIT. It is most frequently used for database benchmarks, but | |
665 | can also be used to create arbitrarily complex workloads that do not involve a | |
666 | database server. @command{sysbench} comes with the following bundled | |
667 | benchmarks: | |
668 | @table @file | |
669 | @item oltp_*.lua | |
670 | A collection of OLTP-like database benchmarks. | |
671 | @item fileio | |
672 | A filesystem-level benchmark. | |
673 | @item cpu | |
674 | A simple CPU benchmark. | |
675 | @item memory | |
676 | A memory access benchmark. | |
677 | @item threads | |
678 | A thread-based scheduler benchmark. | |
679 | @item mutex | |
680 | A POSIX mutex benchmark. | |
681 | @end table | |
682 | It includes features such as: | |
683 | @itemize | |
684 | @item | |
685 | Extensive statistics about rate and latency is available, including latency | |
686 | percentiles and histograms. | |
687 | @item | |
688 | Low overhead even with thousands of concurrent threads. @command{sysbench} is | |
689 | capable of generating and tracking hundreds of millions of events per second. | |
690 | @item | |
691 | New benchmarks can be easily created by implementing pre-defined hooks in | |
692 | user-provided Lua scripts. | |
693 | @item | |
694 | @end itemize") | |
695 | (license license:gpl2+))) |