projects/guix·blob java-team · refs

973 lines · 40.5 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016, 2017, 2021 Marius Bakke <[email protected]>
3;;; Copyright © 2017 Dave Love <[email protected]>
4;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <[email protected]>
5;;; Copyright © 2018, 2019, 2025 Ricardo Wurmus <[email protected]>
6;;; Copyright © 2019 Eric Bavier <[email protected]>
7;;; Copyright © 2019 Gábor Boskovits <[email protected]>
8;;; Copyright © 2019, 2021, 2026 Ludovic Courtès <[email protected]>
9;;; Copyright © 2020 Vincent Legoll <[email protected]>
10;;; Copyright © 2020 malte Frank Gerdes <[email protected]>
11;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer <[email protected]>
12;;; Copyright © 2020 Greg Hogan <[email protected]>
13;;; Copyright © 2021 Arun Isaac <[email protected]>
14;;; Copyright © 2022 Tomasz Jeneralczyk <[email protected]>
15;;; Copyright © 2024 Nicolas Graves <[email protected]>
16;;; Copyright © 2025-2026 Artyom V. Poptsov <[email protected]>
17;;; Copyright © 2026 Sughosha <[email protected]>
18;;; Copyright © 2023 Advanced Micro Devices, Inc.
19;;;
20;;; This file is part of GNU Guix.
21;;;
22;;; GNU Guix is free software; you can redistribute it and/or modify it
23;;; under the terms of the GNU General Public License as published by
24;;; the Free Software Foundation; either version 3 of the License, or (at
25;;; your option) any later version.
26;;;
27;;; GNU Guix is distributed in the hope that it will be useful, but
28;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30;;; GNU General Public License for more details.
31;;;
32;;; You should have received a copy of the GNU General Public License
33;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34
35(define-module (gnu packages benchmark)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (guix packages)
38 #:use-module (guix download)
39 #:use-module (guix gexp)
40 #:use-module (guix utils)
41 #:use-module (guix git-download)
42 #:use-module (guix amd-gpu)
43 #:use-module (guix search-paths)
44 #:use-module (guix build-system cmake)
45 #:use-module (guix build-system qt)
46 #:use-module (guix build-system gnu)
47 #:use-module (guix build-system pyproject)
48 #:use-module (guix build-system meson)
49 #:use-module (gnu packages)
50 #:use-module (gnu packages autotools)
51 #:use-module (gnu packages base)
52 #:use-module (gnu packages bash)
53 #:use-module (gnu packages c)
54 #:use-module (gnu packages cmake)
55 #:use-module (gnu packages gcc)
56 #:use-module (gnu packages nss)
57 #:use-module (gnu packages check)
58 #:use-module (gnu packages compression)
59 #:use-module (gnu packages databases)
60 #:use-module (gnu packages docbook)
61 #:use-module (gnu packages file-systems)
62 #:use-module (gnu packages freedesktop)
63 #:use-module (gnu packages gl)
64 #:use-module (gnu packages graphics)
65 #:use-module (gnu packages kde-frameworks)
66 #:use-module (gnu packages linux)
67 #:use-module (gnu packages lua)
68 #:use-module (gnu packages llvm)
69 #:use-module (gnu packages maths)
70 #:use-module (gnu packages mpi)
71 #:use-module (gnu packages opencl)
72 #:use-module (gnu packages perl)
73 #:use-module (gnu packages php)
74 #:use-module (gnu packages pkg-config)
75 #:use-module (gnu packages polkit)
76 #:use-module (gnu packages python)
77 #:use-module (gnu packages python-build)
78 #:use-module (gnu packages python-check)
79 #:use-module (gnu packages python-science)
80 #:use-module (gnu packages python-web)
81 #:use-module (gnu packages python-xyz)
82 #:use-module (gnu packages qt)
83 #:use-module (gnu packages rocm)
84 #:use-module (gnu packages vulkan)
85 #:use-module (gnu packages xdisorg)
86 #:use-module (gnu packages xorg)
87 #:use-module (gnu packages xml)
88 #:use-module (ice-9 match))
89
90;; Lazily resolve the gcc-toolchain to avoid a circular dependency.
91(define gcc-toolchain*
92 (delay (module-ref (resolve-interface '(gnu packages commencement))
93 'gcc-toolchain)))
94
95(define-public fio
96 (package
97 (name "fio")
98 (version "3.42")
99 (source (origin
100 (method url-fetch)
101 (uri (string-append "https://brick.kernel.dk/snaps/"
102 "fio-" version ".tar.bz2"))
103 (sha256
104 (base32
105 "0rizrm0c7shpibcqw07jg4g01yaxf5i7b0bi7zda65g5zmlnq4mc"))))
106 (build-system gnu-build-system)
107 (arguments
108 (list #:modules
109 `(,@%default-gnu-modules
110 (ice-9 textual-ports))
111 #:test-target "test"
112 #:configure-flags
113 #~(list "--disable-native") ;don't generate code for the build CPU
114 #:phases
115 #~(modify-phases %standard-phases
116 (replace 'configure
117 (lambda* (#:key (configure-flags ''()) #:allow-other-keys)
118 ;; The configure script doesn't understand some of the
119 ;; GNU options, so we can't use the stock phase.
120 (apply invoke "./configure"
121 (string-append "--prefix=" #$output)
122 configure-flags)))
123 ;; The main `fio` executable is fairly small and self contained.
124 ;; Moving the auxiliary scripts to a separate output saves ~100 MiB
125 ;; on the closure.
126 (add-after 'install 'move-outputs
127 (lambda _
128 (let ((oldbin (string-append #$output "/bin"))
129 (newbin (string-append #$output:utils "/bin"))
130 (script? (lambda* (file #:rest _)
131 (call-with-input-file file
132 (lambda (port)
133 (char=? #\# (peek-char port)))))))
134 (mkdir-p newbin)
135 (for-each (lambda (file)
136 (link file (string-append newbin "/" (basename file)))
137 (delete-file file))
138 (find-files oldbin script?))))))))
139 (outputs '("out" "utils"))
140 (inputs
141 (list libaio python zlib))
142 (home-page "https://github.com/axboe/fio")
143 (synopsis "Flexible I/O tester")
144 (description
145 "fio is a tool that will spawn a number of threads or processes doing a
146particular type of I/O action as specified by the user. The typical use of fio
147is to write a job file matching the I/O load one wants to simulate.")
148 ;; The software is distributed under the GPL2, but a handful of components
149 ;; are covered by other licenses.
150 (license (list license:gpl2 license:gpl2+ license:bsd-2
151 license:public-domain))))
152
153(define-public intel-mpi-benchmarks/openmpi
154 (package
155 (name "intel-mpi-benchmarks")
156 (version "2021.7")
157 (source (origin
158 (method git-fetch)
159 (uri (git-reference
160 (url "https://github.com/intel/mpi-benchmarks")
161 (commit (string-append "IMB-v" version))))
162 (file-name (git-file-name name version))
163 (sha256
164 (base32
165 "184r4h35mzxjzzjnl4nhr1vh00iiz8kf9vf4d8lrqbr62rqrwl7w"))
166 (modules '((guix build utils)))
167 (snippet
168 '(begin
169 ;; Some source configuration files in the original tarball
170 ;; have inappropriate execute permissions, which interferes
171 ;; with the install phase below.
172 (for-each (lambda (file) (chmod file #o444))
173 (find-files "WINDOWS" "."))
174 #t))))
175 (build-system gnu-build-system)
176 (inputs
177 (list openmpi))
178 (arguments
179 `(#:phases
180 (modify-phases %standard-phases
181 (delete 'configure)
182 (delete 'check)
183 (replace 'install
184 (lambda* (#:key outputs #:allow-other-keys)
185 (define (benchmark? file stat)
186 (and (string-prefix? "IMB-" (basename file))
187 (executable-file? file)))
188
189 (let* ((out (assoc-ref outputs "out"))
190 (bin (string-append out "/bin")))
191 (for-each (lambda (file)
192 (install-file file bin))
193 (find-files "." benchmark?))
194 #t))))
195
196 ;; The makefile doesn't express all the dependencies, it seems.
197 #:parallel-build? #t
198
199 #:make-flags '("CC=mpicc" "CXX=mpicxx")))
200 (home-page "https://software.intel.com/en-us/articles/intel-mpi-benchmarks")
201 (synopsis "Benchmarks for the Message Passing Interface (MPI)")
202 (description
203 "This package provides benchmarks for implementations of the @dfn{Message
204Passing Interface} (MPI). It contains MPI performance measurements for
205point-to-point and global communication, and file, operations for a range of
206message sizes. The generated benchmark data fully characterize:
207
208@itemize
209@item
210Performance of a cluster system, including node performance, network latency,
211and throughput;
212@item
213Efficiency of the MPI implementation.
214@end itemize")
215 (license license:cpl1.0)))
216
217(define-public multitime
218 (package
219 (name "multitime")
220 (version "1.4")
221 (source (origin
222 (method url-fetch)
223 (uri (string-append "https://tratt.net/laurie/src/"
224 "multitime/releases/"
225 "multitime-" version ".tar.gz"))
226 (sha256
227 (base32
228 "0iyfsdrbyqa7a4ifrh19l9a48hgv7ld6m0d8yf9bkl12q0qw91fx"))))
229 (build-system gnu-build-system)
230 (arguments '(#:tests? #f)) ; there are no tests
231 (home-page "https://tratt.net/laurie/src/multitime/")
232 (synopsis "Time command execution over multiple executions")
233 (description
234 "The @code{time} utility is a simple and often effective way of measuring
235how long a command takes to run (wall time). Unfortunately, running a command
236once can give misleading timings. @code{multitime} is, in essence, a simple
237extension to @code{time} which runs a command multiple times and prints the
238timing means, standard deviations, mins, medians, and maxes having done so.
239This can give a much better understanding of the command's performance.")
240 (license license:expat)))
241
242(define-public benchmark
243 (package
244 (name "benchmark")
245 (version "1.9.4")
246 (source (origin
247 (method git-fetch)
248 (uri (git-reference
249 (url "https://github.com/google/benchmark")
250 (commit (string-append "v" version))))
251 (file-name (git-file-name name version))
252 (sha256
253 (base32
254 "05b5sf0dmgr5s9dbvasg8rndh754kkc4chni6ynqa1h8m5q0kg1z"))))
255 (build-system cmake-build-system)
256 (native-inputs
257 `(("googletest-source" ,(package-source googletest))
258 ("googletest" ,googletest)))
259 (arguments
260 `(#:phases
261 (modify-phases %standard-phases
262 (add-after 'unpack 'unpack-googletest
263 (lambda* (#:key inputs #:allow-other-keys)
264 (copy-recursively (assoc-ref inputs "googletest-source")
265 "googletest"))))))
266 (home-page "https://github.com/google/benchmark")
267 (synopsis "Microbenchmark support library")
268 (description
269 "Benchmark is a library to benchmark code snippets, similar to unit
270tests.")
271 (license license:asl2.0)))
272
273(define-public bonnie++
274 (package
275 (name "bonnie++")
276 (version "2.00a")
277 (source (origin
278 (method url-fetch)
279 (uri (string-append "https://www.coker.com.au/bonnie++/bonnie++-"
280 version ".tgz"))
281 (sha256
282 (base32
283 "03lg8rz2a9wgwn9axd6gkjiswgxmp62fbxjvrrcvazmwh6ykplx8"))))
284 (build-system gnu-build-system)
285 (native-inputs
286 (list perl))
287 (arguments
288 (list
289 #:make-flags #~(list "MORECFLAGS=-std=c++11")
290 #:phases
291 #~(modify-phases %standard-phases
292 (replace 'check
293 (lambda* (#:key tests? #:allow-other-keys)
294 (when tests?
295 (begin
296 ;; As seen in ./debian/tests/smoke
297 (mkdir "test-dir")
298 (invoke "./bonnie++" "-q"
299 "-d" "test-dir"
300 "-s" "-0"
301 "-n" "1"))))))))
302 (home-page "https://doc.coker.com.au/projects/bonnie/")
303 (synopsis "Hard drive and file system benchmark suite")
304 (description
305 "Bonnie++ is a benchmark suite that is aimed at performing a number of
306simple tests of hard drive and file system performance. Bonnie++ allows you to
307benchmark how your file systems perform with respect to data read and write
308speed, the number of seeks that can be performed per second, and the number of
309file metadata operations that can be performed per second.")
310 (license license:gpl2))) ;GPL 2 only, see copyright.txt
311
312(define-public phoronix-test-suite
313 (package
314 (name "phoronix-test-suite")
315 (version "10.8.4")
316 (source
317 (origin
318 (method url-fetch)
319 (uri (string-append "https://phoronix-test-suite.com/releases/"
320 name "-" version ".tar.gz"))
321 (modules '((guix build utils)
322 (ice-9 ftw)
323 (ice-9 regex)
324 (srfi srfi-26)))
325 (snippet
326 '(begin
327 ;; Many test profiles have their license identified as "Free",
328 ;; while they are in fact non-free (see:
329 ;; https://github.com/phoronix-test-suite/phoronix-test-suite/issues/667).
330 (define problems ;see:
331 '("bioshock-infinite-1" ;mis-licensed as free
332 "firefox" ;not FSDG-compliant
333 "dirt-rally" ;mis-licensed as free
334 "dirt-showdown" ;mis-licensed as free
335 "dota2" ;mis-licensed as free
336 "dow3" ;mis-licensed as free
337 "etqw-demo" ;mis-licensed as free
338 "f12015" ;mis-licensed as free
339 "f12017" ;mis-licensed as free
340 "geexlab" ;mis-licensed as free
341 "gfxbench" ;mis-licensed as free
342 "gnupg" ;downloads ubuntu image
343 "hitman-1" ;mis-licensed as free
344 "hl2lostcoast" ;mis-licensed as free
345 "linux" ;contains blobs
346 "madmax" ;mis-licensed as free
347 "metro" ;mis-licensed as free
348 "minion" ;mis-licensed as free
349 "sam2017" ;mis-licensed as free
350 "talos-principle" ;mis-licensed as free
351 "tomb-raider" ;mis-licensed as free
352 "tf2" ;mis-licensed as free
353 "ue4" ;mis-licensed as free
354 "unigine" ;mis-licensed as free
355 "ut2004")) ;mis-licensed as free
356
357 (define rx (format #f "(~a)" (string-join problems "|")))
358
359 (define (mark-as-non-free directory)
360 (format #t "Marking ~s as non-free...~%" directory)
361 (substitute* (find-files directory "^(test|suite)-definition.xml$")
362 (("Free")
363 "Non-free")))
364
365 (with-directory-excursion "ob-cache/test-profiles/pts"
366 (for-each (cut mark-as-non-free <>)
367 (scandir "." (cut string-match rx <>))))))
368 (sha256
369 (base32
370 "1x5pyzzn7ipi0ia1xlvq3bpw0rgf7h7sbr2kzhz1k8y06var480z"))
371 (patches (search-patches "phoronix-test-suite-fsdg.patch"))))
372 (arguments
373 (list
374 #:tests? #f ;no test suite
375 #:phases
376 #~(modify-phases %standard-phases
377 (delete 'configure)
378 (delete 'build)
379 (replace 'install
380 (lambda _
381 (invoke "./install-sh" #$output "--free-software-only")))
382 (add-after 'install 'wrap-binary
383 (lambda* (#:key inputs #:allow-other-keys)
384 (let ((pts (string-append #$output "/bin/phoronix-test-suite"))
385 (gcc #$(this-package-input "gcc-toolchain")))
386 (wrap-program pts
387 (list "PATH" 'prefix
388 (map (lambda (binary)
389 (dirname (search-input-file
390 inputs (string-append "bin/" binary))))
391 '("bash" "cat" ;coreutils
392 "gcc"
393 "gzip" "make" "php" "sed" "tar" "which")))
394 ;; Wrap the GCC compiler paths.
395 (list "C_INCLUDE_PATH" 'prefix
396 (list (string-append gcc "/include")))
397 (list "CPLUS_INCLUDE_PATH" 'prefix
398 (list (string-append gcc "/include/c++")
399 (string-append gcc "/include")))
400 (list "LIBRARY_PATH" 'prefix
401 (list (string-append gcc "/lib"))))))))))
402 (build-system gnu-build-system)
403 (native-inputs (list python which))
404 ;; Wrap the most basic build tools needed by Phoronix Test Suite to build
405 ;; simple tests such as 'fio'.
406 (inputs
407 (list bash
408 coreutils
409 (force gcc-toolchain*)
410 gnu-make
411 gzip
412 php
413 sed
414 tar
415 which))
416 (native-search-paths %gcc-search-paths)
417 (home-page "https://www.phoronix-test-suite.com/")
418 (synopsis "Automated testing/benchmarking software")
419 (description
420 "The Phoronix Test Suite is a comprehensive testing and benchmarking platform
421that provides an extensible framework for which new tests can be easily added.
422It can carry out both qualitative and quantitative benchmarks in a clean,
423reproducible, and easy-to-use manner, making it easy to compare one particular
424setup against another one.")
425 (license license:gpl3+)))
426
427(define-public python-benchexec
428 (package
429 (name "python-benchexec")
430 (version "3.35")
431 (source
432 (origin
433 (method git-fetch)
434 (uri (git-reference
435 (url "https://github.com/sosy-lab/benchexec")
436 (commit version)))
437 (file-name (git-file-name name version))
438 (sha256
439 (base32 "08gsvam6j125mdyhns0d5xwpxa2mf4sqvva73bi16a3a6sj55059"))))
440 (build-system pyproject-build-system)
441 (arguments
442 (list
443 #:test-flags #~(list "--exclude=runexecutor")
444 #:phases
445 #~(modify-phases %standard-phases
446 (add-after 'unpack 'fix-paths
447 (lambda* (#:key inputs outputs #:allow-other-keys)
448 (let ((prog (search-input-file inputs "bin/fuse-overlayfs")))
449 (substitute* "benchexec/container.py"
450 (("shutil.which\\(\"fuse-overlayfs\"\\)")
451 (string-append "\"" prog "\""))))))
452 (add-before 'check 'skip-failing-tests
453 (lambda _
454 (delete-file-recursively "benchexec/test_integration"))))))
455 (propagated-inputs (list fuse-overlayfs python-pyyaml))
456 (native-inputs
457 (list coreutils
458 python-lxml
459 python-pynose
460 python-setuptools))
461 (home-page "https://github.com/sosy-lab/benchexec/")
462 (synopsis "Framework for Reliable Benchmarking")
463 (description
464 "BenchExec is a framework for reliable benchmarking, which takes care
465of important low-level details for accurate, precise, and reproducible
466measurements. In particular, it makes use of cgroups, kernel namespaces,
467and overlay filesystems to restrict interference of the executed tool
468with the benchmarking host.")
469 (license license:asl2.0)))
470
471(define-public benchexec
472 (package/inherit python-benchexec
473 (name "benchexec")
474 (inputs (package-propagated-inputs python-benchexec))
475 (propagated-inputs (list))))
476
477(define-public python-locust
478 (package
479 (name "python-locust")
480 (version "2.33.2")
481 ;; The archive on Pypi has no tests.
482 (source (origin
483 (method git-fetch)
484 (uri (git-reference
485 (url "https://github.com/locustio/locust")
486 (commit version)))
487 (file-name (git-file-name name version))
488 (sha256
489 (base32
490 "055is6plxjajzp7v5q108n90j5mvdaylpna98kw9zsqn7mvfq7ms"))))
491 (build-system pyproject-build-system)
492 (arguments
493 (list
494 #:test-flags
495 '(list "--pyargs" "locust/test"
496 "-k" (string-join
497 '( ;; These tests return "non-zero exit status 1".
498 "not test_default_headless_spawn_options"
499 "not test_default_headless_spawn_options_with_shape"
500 "not test_headless_spawn_options_wo_run_time"
501 ;; Fails because of timezone discrepancy, even when TZDIR
502 ;; is set.
503 "not test_format_utc_timestamp"
504 ;; These tests fail with a HTTP return code of
505 ;; 500 instead of 200, for unknown reasons.
506 "not test_autostart_mutliple_locustfiles_with_shape"
507 "not test_autostart_w_load_shape"
508 "not test_autostart_wo_run_time"
509 "not test_percentile_parameter"
510 "not test_percentiles_to_statistics"
511 "not test_autostart_multiple_locustfiles_with_shape"
512 "not test_graceful_exit_when_keyboard_interrupt"
513 "not test_host_value_from_multiple_user_classes"
514 "not test_host_value_from_multiple_user_classes_different_hosts"
515 "not test_host_value_from_user_class"
516 "not test_html_stats_report"
517 "not test_index"
518 "not test_index_with_spawn_options"
519 "not test_report_download"
520 "not test_report_exceptions"
521 "not test_report_host"
522 "not test_report_host2"
523 "not test_report_page"
524 "not test_report_page_empty_stats"
525 "not test_index_with_web_login_enabled_no_user"
526 "not test_index_with_web_login_enabled_valid_user"
527 "not test_index_with_https"
528 "not test_ssl_request_insecure"
529 ;; Fails because of unavailable IPv6
530 "not test_constructor"
531 ;; Process fails to terminate, which breaks following tests
532 "not test_processes_ctrl_c"
533 ;; These tests depend on networking.
534 "not test_html_report_option"
535 "not test_json_schema"
536 "not test_locustfile_from_url"
537 "not test_web_options"
538 ;; These tests fail because of the warning
539 ;; "System open file limit '1024' is below
540 ;; minimum setting '10000'".
541 "not test_autostart_w_run_time"
542 "not test_skip_logging"
543 ;; On some (slow?) machines, the following tests
544 ;; fail, with the processes returning exit code
545 ;; -15 instead of the expected 42 and 0,
546 ;; respectively (see:
547 ;; https://github.com/locustio/locust/issues/1708).
548 "not test_custom_exit_code"
549 "not test_webserver"
550 ;; These fail on the build farm for unknown reasons. I
551 ;; suspect the test suite is just really picky and
552 ;; stateful.
553 "not test_workers_shut_down_if_master_is_gone"
554 "not test_custom_arguments_in_file"
555 "not test_custom_arguments"
556 ;; These are time critical and can fail on busy machines.
557 "not test_distribute_users"
558 "not test_ramp_down_from_100_000_to_0_users_with_50_user_classes_and_1000_workers_and_5000_spawn_rate"
559 "not test_ramp_up_from_0_to_100_000_users_with_50_user_classes_and_1000_workers_and_5000_spawn_rate"
560 ;; This test fails with "AssertionError:
561 ;; 'stopped' != 'stopping'".
562 "not test_distributed_shape"
563 ;; This test fails with AssertionError:
564 ;; "locust [...] != .locust-real"
565 "not test_invalid_stop_timeout_string"
566 ) " and "))
567 #:phases
568 #~(modify-phases %standard-phases
569 (add-before 'check 'increase-resource-limits
570 (lambda _
571 ;; XXX: Copied from ungoogled-chromium.
572 ;; Try increasing the soft resource limit of max open files to 2048,
573 ;; or equal to the hard limit, whichever is lower.
574 (call-with-values (lambda () (getrlimit 'nofile))
575 (lambda (soft hard)
576 (when (and soft (< soft 2048))
577 (if hard
578 (setrlimit 'nofile (min hard 2048) hard)
579 (setrlimit 'nofile 2048 #f))
580 (format #t
581 "increased maximum number of open files from ~d to ~d~%"
582 soft (if hard (min hard 2048) 2048))))))))))
583 (propagated-inputs
584 (list python-configargparse
585 python-flask
586 python-flask-cors
587 python-flask-login
588 python-gevent
589 python-geventhttpclient
590 python-msgpack
591 python-psutil
592 python-pyzmq
593 python-requests
594 python-setuptools
595 python-tomli
596 python-typing-extensions
597 python-werkzeug))
598 (native-inputs
599 (list nss-certs-for-test
600 python-hatchling
601 python-hatch-vcs
602 python-pyquery
603 python-pytest
604 python-retry))
605 (home-page "https://locust.io/")
606 (synopsis "Distributed load testing framework")
607 (description "Locust is a performance testing tool that aims to be easy to
608use, scriptable and scalable. The test scenarios are described in plain
609Python. It provides a web-based user interface to visualize the results in
610real-time, but can also be run non-interactively. Locust is primarily geared
611toward testing HTTP-based applications or services, but it can be customized to
612test any system or protocol.
613
614Note: Locust will complain if the available open file descriptors limit for
615the user is too low. To raise such limit on a Guix System, refer to
616@samp{info guix --index-search=pam-limits-service-type}.")
617 (license license:expat)))
618
619(define-public interbench
620 (package
621 (name "interbench")
622 (version "0.31")
623 (source
624 (origin
625 (method git-fetch)
626 (uri (git-reference
627 (url "https://github.com/ckolivas/interbench")
628 (commit (string-append "v" version))))
629 (file-name (git-file-name name version))
630 (sha256
631 (base32
632 "0ifnw8vnkcgrksx7g5d9ii4kjppqnk32lvrybdybmibyvag6zfdc"))))
633 (build-system gnu-build-system)
634 (arguments
635 (list #:tests? #f ; no tests
636 #:make-flags
637 #~(list "CFLAGS=-g -O2 -Wno-error=implicit-function-declaration"
638 (string-append "CC=" #$(cc-for-target)))
639 #:phases
640 #~(modify-phases %standard-phases
641 (add-after 'unpack 'fix-broken-makefile
642 (lambda _
643 ;; Remove erroneous "-lm" target
644 (substitute* "Makefile"
645 (("hackbench.o -lm") "hackbench.o"))))
646 (delete 'configure)
647 (replace 'install
648 (lambda _
649 (install-file "interbench"
650 (string-append #$output "/bin"))
651 (install-file "interbench.8"
652 (string-append #$output
653 "/share/man/man8")))))))
654 (native-inputs (list gcc-10))
655 (home-page "http://users.on.net/~ckolivas/interbench/")
656 (synopsis "Interactivity benchmark")
657 (description "interbench is designed to benchmark interactivity on Linux.
658It is designed to measure the effect of changes in Linux kernel design or
659system configuration changes such as CPU, I/O scheduler and filesystem changes
660and options. With careful benchmarking, different hardware can be compared.")
661 (license license:gpl2+)))
662
663(define-public clpeak
664 (package
665 (name "clpeak")
666 (version "2.0.19")
667 (source
668 (origin
669 (method git-fetch)
670 (uri (git-reference
671 (url "https://github.com/krrishnarraj/clpeak")
672 (commit version)))
673 (file-name (git-file-name name version))
674 (sha256
675 (base32 "0cicjf7giycp7xi78086pki767n3czfbv56x3phjx21w9b8blw66"))))
676 (build-system cmake-build-system)
677 (home-page "https://github.com/krrishnarraj/clpeak")
678 (native-inputs (list clang)) ; it only compiles with clang
679 (inputs (list opencl-clhpp opencl-icd-loader))
680 (synopsis "OpenCL benchmark tool")
681 (description
682 "@code{clpeak} is a synthetic benchmarking tool to measure peak
683capabilities of OpenCL devices. It only measures the peak metrics that can be
684achieved using vector operations and does not represent a real-world use case.")
685 (license license:asl2.0)))
686
687(define-public kdiskmark
688 (package
689 (name "kdiskmark")
690 (version "3.3.0")
691 (source (origin
692 (method git-fetch)
693 (uri (git-reference
694 (url "https://github.com/JonMagon/KDiskMark")
695 (commit version)))
696 (file-name (git-file-name name version))
697 (sha256
698 (base32
699 "1070vy56xd9fkcyvrs9lm21vhc3ppc337gw4y3xc58c5wdq9xnwc"))))
700 (build-system qt-build-system)
701 (arguments
702 (list
703 #:qtbase qtbase
704 #:configure-flags
705 #~(list (string-append "-DPOLKITQT-1_INSTALL_DIR=" #$output))
706 #:tests? #f ;no test suite
707 #:phases
708 #~(modify-phases %standard-phases
709 (add-after 'unpack 'patch-paths
710 (lambda* (#:key inputs #:allow-other-keys)
711 (substitute* "src/benchmark.cpp"
712 (("\"fio\"")
713 (format #f "~s" (search-input-file inputs "bin/fio"))))))
714 (add-after 'unpack 'inject-single-application-source
715 (lambda _
716 (rmdir "src/singleapplication")
717 (symlink #$(package-source
718 (this-package-input "single-application"))
719 "src/singleapplication"))))))
720 (native-inputs (list extra-cmake-modules qttools))
721 (inputs (list fio polkit-qt6 single-application qtwayland))
722 (home-page "https://github.com/JonMagon/KDiskMark")
723 (synopsis "Simple disk benchmark tool")
724 (description "KDiskMark is an HDD and SSD benchmark tool. KDiskMark
725abstracts away the complexity of the Flexible I/O Tester (@command{fio})
726command via a convenient graphical user interface (GUI) and handles its output
727to provide an easy to view and interpret benchmark result. The application is
728written in C++ with Qt and doesn't have any runtime KDE dependencies. Among
729its features are:
730@itemize
731@item Configurable block size, queues, and threads count for each test
732@item Many languages support
733@item Report generation.
734@end itemize")
735 (license license:gpl3+)))
736
737(define-public sysbench
738 (package
739 (name "sysbench")
740 (version "1.0.20")
741 (source (origin
742 (method git-fetch)
743 (uri (git-reference
744 (url "https://github.com/akopytov/sysbench")
745 (commit version)))
746 (file-name (git-file-name name version))
747 (modules '((guix build utils)))
748 (snippet '(begin
749 ;; Ensure no bundled libraries get used.
750 (delete-file-recursively "third_party")
751 (substitute* "configure.ac"
752 (("^third_party/.*")
753 ""))
754 (substitute* "Makefile.am"
755 ((".*(LUAJIT|CK)_DIR =.*")
756 ""))))
757 (sha256
758 (base32
759 "1sanvl2a52ff4shj62nw395zzgdgywplqvwip74ky8q7s6qjf5qy"))))
760 (build-system gnu-build-system)
761 (arguments
762 (list
763 #:configure-flags #~(list "--with-pgsql"
764 "--with-system-luajit"
765 "--with-system-ck"
766 ;; If we let the build tool select the most
767 ;; optimal compiler architecture flag, the
768 ;; build is not reproducible.
769 "--without-gcc-arch")
770 #:phases #~(modify-phases %standard-phases
771 (add-after 'unpack 'patch-test-runner
772 (lambda _
773 (substitute* "tests/test_run.sh"
774 (("/bin/bash")
775 (which "bash"))
776 ;; Do not attempt to invoke the cram command via
777 ;; Python, as on Guix it is a shell script (wrapper).
778 (("\\$\\(command -v cram\\)")
779 "-m cram"))
780 (substitute* "tests/t/opt_report_checkpoints.t"
781 ;; egrep outputs a deprecation warning, which breaks
782 ;; the test.
783 (("egrep")
784 "grep -E"))))
785 (add-after 'unpack 'disable-test-installation
786 (lambda _
787 (substitute* "tests/Makefile.am"
788 (("install-data-local")
789 "do-not-install-data-local")
790 (("^test_SCRIPTS.*")
791 "")))))))
792 (native-inputs (list autoconf
793 automake
794 libtool
795 pkg-config
796 python-cram
797 python-wrapper
798 which
799 ;; For documentation
800 libxslt
801 docbook-xml
802 docbook-xsl))
803 (inputs (list ck libaio luajit (list mariadb "dev") postgresql))
804 (home-page "https://github.com/akopytov/sysbench/")
805 (synopsis "Scriptable database and system performance benchmark")
806 (description "@command{sysbench} is a scriptable multi-threaded benchmark
807tool based on LuaJIT. It is most frequently used for database benchmarks, but
808can also be used to create arbitrarily complex workloads that do not involve a
809database server. @command{sysbench} comes with the following bundled
810benchmarks:
811@table @file
812@item oltp_*.lua
813A collection of OLTP-like database benchmarks.
814@item fileio
815A filesystem-level benchmark.
816@item cpu
817A simple CPU benchmark.
818@item memory
819A memory access benchmark.
820@item threads
821A thread-based scheduler benchmark.
822@item mutex
823A POSIX mutex benchmark.
824@end table
825It includes features such as:
826@itemize
827@item
828Extensive statistics about rate and latency is available, including latency
829percentiles and histograms.
830@item
831Low overhead even with thousands of concurrent threads. @command{sysbench} is
832capable of generating and tracking hundreds of millions of events per second.
833@item
834New benchmarks can be easily created by implementing pre-defined hooks in
835user-provided Lua scripts.
836@item
837@end itemize")
838 (license license:gpl2+)))
839
840(define-public vkmark
841 (package
842 (name "vkmark")
843 (version "2025.01")
844 (source
845 (origin
846 (method git-fetch)
847 (uri (git-reference
848 (url "https://github.com/vkmark/vkmark")
849 (commit version)))
850 (file-name (git-file-name name version))
851 (sha256
852 (base32 "0mpxyfwln1627zzi11fb6lgv7x1jz1p2w16w1mhhkdz1xsln6fj6"))
853 (patches (search-patches "vkmark-2025.1-fix-vulkan-headers-1.4.333.patch"))))
854 (build-system meson-build-system)
855 (arguments
856 (list
857 #:phases
858 #~(modify-phases %standard-phases
859 (add-after 'unpack 'unbundle-vulkan-headers
860 (lambda* (#:key inputs #:allow-other-keys)
861 (substitute* "src/meson.build"
862 (("vulkan_dep.get_pkgconfig_variable\\('prefix'\\)")
863 (string-append "'" #$(this-package-input "vulkan-headers") "'"))))))))
864 (native-inputs (list pkg-config))
865 (inputs (list vulkan-loader
866 vulkan-headers
867 cmake
868 glm
869 assimp
870 libxcb
871 libdrm
872 mesa
873 xcb-util-wm
874 wayland-protocols
875 wayland))
876 (home-page "https://github.com/vkmark/vkmark")
877 (synopsis "Extensible benchmarking suite for Vulkan")
878 (description
879 "vkmark offers a suite of scenes that can be used to measure various
880aspects of Vulkan performance. The way in which each scene is rendered is
881configurable through a set of options.")
882 (license license:lgpl2.1+)))
883
884(define-public osu-micro-benchmarks
885 (package
886 (name "osu-micro-benchmarks")
887 (version "7.5.1")
888 (source
889 (origin
890 (method url-fetch)
891 (uri (string-append
892 "https://mvapich.cse.ohio-state.edu/download/mvapich/" name "-"
893 version ".tar.gz"))
894 (sha256
895 (base32 "08ifql3q8kv22xncvp6asfqp62dvfnc7w96b1r925c1w7ig0s38n"))))
896 (build-system gnu-build-system)
897 (inputs (list openmpi))
898 (arguments
899 (list
900 #:configure-flags
901 #~(list (string-append
902 "CC=" #$(this-package-input "openmpi") "/bin/mpicc")
903 (string-append
904 "CXX=" #$(this-package-input "openmpi") "/bin/mpicxx"))
905 #:phases
906 #~(modify-phases %standard-phases
907 ;; OSU installs its binaries to /libexec. Have a symlink in /bin to
908 ;; improve user experience.
909 (add-after 'install 'symlink-binaries-in-bin
910 (lambda _
911 (mkdir-p (string-append #$output "/bin"))
912 (for-each (lambda (file)
913 (symlink file
914 (string-append #$output "/bin/"
915 (basename file))))
916 (find-files (string-append #$output
917 "/libexec"))))))))
918 (home-page "https://mvapich.cse.ohio-state.edu/benchmarks/")
919 (synopsis "Benchmarking suite from the MVAPICH project")
920 (description
921 "Microbenchmarks suite to evaluate MPI and PGAS (OpenSHMEM, UPC, and
922UPC++) libraries for CPUs and GPUs.")
923 (license license:bsd-3)))
924
925(define-public babelstream-hip
926 (package
927 (name "babelstream-hip")
928 (version "5.0")
929 (source
930 (origin
931 (method git-fetch)
932 (uri (git-reference
933 (url "https://github.com/UoB-HPC/BabelStream.git")
934 (commit (string-append "v" version))))
935 (file-name (git-file-name name version))
936 (sha256
937 (base32
938 "0xkkxkmyi99qly427gkdijm9vwvmhwkgfm283ay6f83r66f712g4"))))
939 (build-system cmake-build-system)
940 (arguments
941 (list
942 #:build-type "Release" ;"RelWithDebInfo" is not supported
943 #:tests? #f ;no tests
944 #:configure-flags
945 #~(list (string-append "-DMODEL=hip")
946 (string-append "-DCMAKE_CXX_COMPILER="
947 #$(this-package-native-input "rocm-hipcc")
948 "/bin/hipcc")
949 (string-append "-DCXX_EXTRA_FLAGS=--offload-arch="
950 #$(string-join (current-amd-gpu-targets) ",")))
951 #:phases
952 #~(modify-phases %standard-phases
953 (add-after 'unpack 'avoid-native-optimizations
954 (lambda _
955 (substitute* "CMakeLists.txt"
956 (("-march=native")
957 "-g")))))))
958 (native-inputs (list rocm-hipcc))
959 (inputs (list rocm-hip-runtime lld-rocm llvm-rocm))
960 (properties
961 `((amd-gpu-targets . ,%default-amd-gpu-targets)
962 (tunable? . #t)))
963 (synopsis "Memory bandwidth benchmark for AMD GPUs")
964 (description
965 "The BabelStream benchmark measures memory transfer rates between main
966memory and GPUs. This benchmark is similar in spirit, and based on, John
967D. McCalpin's STREAM benchmark for CPUs. The version of BabelStream is built
968targeting AMD GPUs using HIP.")
969 (home-page "https://github.com/UoB-HPC/BabelStream.git")
970 (license (license:fsf-free
971 "https://github.com/UoB-HPC/BabelStream/blob/main/LICENSE"
972 "Custom permissive license based on John D. McCalpin's \
973original STREAM benchmark."))))