diff options
| author | Ricardo Wurmus <rekado@elephly.net> | 2025-01-07 16:04:10 +0100 |
|---|---|---|
| committer | Ricardo Wurmus <rekado@elephly.net> | 2025-01-20 21:37:37 +0100 |
| commit | c09fc8696d7fde622ff640a9b805b77c59b7e7af (patch) | |
| tree | a2c2b4fd1a3d1daacbf9e4993e2a21dfdcce69bb /gnu/packages/benchmark.scm | |
| parent | b70ac4564ceb09d9e6136a54086c03c36b031865 (diff) | |
gnu: python-locust: Update to 2.32.5.
* gnu/packages/benchmark.scm (python-locust): Update to 2.32.5.
[source]: Get from git repository.
[build-system]: Use pyproject-build-system.
[arguments]: Update list of disabled tests; remove custom 'check phase; add
phase 'fix-version.
[propagated-inputs]: Remove python-flask-basicauth and python-roundrobin; add
python-flask-login, python-setuptools, and python-tomli.
[native-inputs]: Add nss-certs-for-test, python-poetry-core,
and python-poetry-dynamic-versioning; remove python-mock and
python-setuptools-scm.
Change-Id: I5e7203d48eda9279531c9d3060d81d91974dee6e
Diffstat (limited to 'gnu/packages/benchmark.scm')
| -rw-r--r-- | gnu/packages/benchmark.scm | 202 |
1 files changed, 137 insertions, 65 deletions
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm index 326bbc99b40..d204803f970 100644 --- a/gnu/packages/benchmark.scm +++ b/gnu/packages/benchmark.scm | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | ;;; Copyright © 2016, 2017, 2021 Marius Bakke <marius@gnu.org> | 2 | ;;; Copyright © 2016, 2017, 2021 Marius Bakke <marius@gnu.org> |
| 3 | ;;; Copyright © 2017 Dave Love <fx@gnu.org> | 3 | ;;; Copyright © 2017 Dave Love <fx@gnu.org> |
| 4 | ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me@tobias.gr> | 4 | ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me@tobias.gr> |
| 5 | ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net> | 5 | ;;; Copyright © 2018, 2019, 2025 Ricardo Wurmus <rekado@elephly.net> |
| 6 | ;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org> | 6 | ;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org> |
| 7 | ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com> | 7 | ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com> |
| 8 | ;;; Copyright © 2019, 2021 Ludovic Courtès <ludo@gnu.org> | 8 | ;;; Copyright © 2019, 2021 Ludovic Courtès <ludo@gnu.org> |
| @@ -34,17 +34,20 @@ | |||
| 34 | #:use-module (guix packages) | 34 | #:use-module (guix packages) |
| 35 | #:use-module (guix download) | 35 | #:use-module (guix download) |
| 36 | #:use-module (guix gexp) | 36 | #:use-module (guix gexp) |
| 37 | #:use-module (guix utils) | ||
| 37 | #:use-module (guix git-download) | 38 | #:use-module (guix git-download) |
| 38 | #:use-module (guix search-paths) | 39 | #:use-module (guix search-paths) |
| 39 | #:use-module (guix build-system cmake) | 40 | #:use-module (guix build-system cmake) |
| 40 | #:use-module (guix build-system gnu) | 41 | #:use-module (guix build-system gnu) |
| 41 | #:use-module (guix build-system python) | 42 | #:use-module (guix build-system python) |
| 43 | #:use-module (guix build-system pyproject) | ||
| 42 | #:use-module (guix build-system meson) | 44 | #:use-module (guix build-system meson) |
| 43 | #:use-module (gnu packages) | 45 | #:use-module (gnu packages) |
| 44 | #:use-module (gnu packages autotools) | 46 | #:use-module (gnu packages autotools) |
| 45 | #:use-module (gnu packages base) | 47 | #:use-module (gnu packages base) |
| 46 | #:use-module (gnu packages bash) | 48 | #:use-module (gnu packages bash) |
| 47 | #:use-module (gnu packages c) | 49 | #:use-module (gnu packages c) |
| 50 | #:use-module (gnu packages certs) | ||
| 48 | #:use-module (gnu packages check) | 51 | #:use-module (gnu packages check) |
| 49 | #:use-module (gnu packages compression) | 52 | #:use-module (gnu packages compression) |
| 50 | #:use-module (gnu packages databases) | 53 | #:use-module (gnu packages databases) |
| @@ -399,86 +402,155 @@ setup against another one.") | |||
| 399 | (define-public python-locust | 402 | (define-public python-locust |
| 400 | (package | 403 | (package |
| 401 | (name "python-locust") | 404 | (name "python-locust") |
| 402 | (version "2.15.1") | 405 | (version "2.32.5") |
| 403 | (source | 406 | ;; The archive on Pypi has no tests. |
| 404 | (origin | 407 | (source (origin |
| 405 | (method url-fetch) | 408 | (method git-fetch) |
| 406 | (uri (pypi-uri "locust" version)) | 409 | (uri (git-reference |
| 407 | (sha256 | 410 | (url "https://github.com/locustio/locust") |
| 408 | (base32 | 411 | (commit version))) |
| 409 | "05cznfqda0yq2j351jjdssayvj5qc11xkbkwdvv81hcmz4xpyc56")))) | 412 | (file-name (git-file-name name version)) |
| 410 | (build-system python-build-system) | 413 | (sha256 |
| 414 | (base32 | ||
| 415 | "0nmhk2k0mbza9slqgms42s6hsfwwmyr275l90an02qaypx066l1n")))) | ||
| 416 | (build-system pyproject-build-system) | ||
| 411 | (arguments | 417 | (arguments |
| 412 | '(#:phases | 418 | (list |
| 413 | (modify-phases %standard-phases | 419 | #:test-flags |
| 414 | (add-before 'check 'increase-resource-limits | 420 | '(list "--pyargs" "locust/test" |
| 415 | (lambda _ | 421 | "-k" (string-join |
| 416 | ;; XXX: Copied from ungoogled-chromium. | 422 | '( ;; These tests return "non-zero exit status 1". |
| 417 | ;; Try increasing the soft resource limit of max open files to 2048, | 423 | "not test_default_headless_spawn_options" |
| 418 | ;; or equal to the hard limit, whichever is lower. | 424 | "not test_default_headless_spawn_options_with_shape" |
| 419 | (call-with-values (lambda () (getrlimit 'nofile)) | 425 | "not test_headless_spawn_options_wo_run_time" |
| 420 | (lambda (soft hard) | 426 | ;; Fails because of timezone discrepancy, even when TZDIR |
| 421 | (when (and soft (< soft 2048)) | 427 | ;; is set. |
| 422 | (if hard | 428 | "not test_format_utc_timestamp" |
| 423 | (setrlimit 'nofile (min hard 2048) hard) | 429 | ;; These tests fail with a HTTP return code of |
| 424 | (setrlimit 'nofile 2048 #f)) | 430 | ;; 500 instead of 200, for unknown reasons. |
| 425 | (format #t | 431 | "not test_autostart_mutliple_locustfiles_with_shape" |
| 426 | "increased maximum number of open files from ~d to ~d~%" | 432 | "not test_autostart_w_load_shape" |
| 427 | soft (if hard (min hard 2048) 2048))))))) | 433 | "not test_autostart_wo_run_time" |
| 428 | (replace 'check | 434 | "not test_percentile_parameter" |
| 429 | (lambda* (#:key tests? #:allow-other-keys) | 435 | "not test_percentiles_to_statistics" |
| 430 | (when tests? | 436 | "not test_autostart_multiple_locustfiles_with_shape" |
| 431 | (invoke "python" "-m" "pytest" "locust" | 437 | "not test_graceful_exit_when_keyboard_interrupt" |
| 432 | "-k" (string-join | 438 | "not test_host_value_from_multiple_user_classes" |
| 433 | '( ;; These tests return "non-zero exit status 1". | 439 | "not test_host_value_from_multiple_user_classes_different_hosts" |
| 434 | "not test_default_headless_spawn_options" | 440 | "not test_host_value_from_user_class" |
| 435 | "not test_default_headless_spawn_options_with_shape" | 441 | "not test_html_stats_report" |
| 436 | "not test_headless_spawn_options_wo_run_time" | 442 | "not test_index" |
| 437 | ;; These tests fail with a HTTP return code of | 443 | "not test_index_with_spawn_options" |
| 438 | ;; 500 instead of 200, for unknown reasons. | 444 | "not test_report_download" |
| 439 | "not test_autostart_mutliple_locustfiles_with_shape" | 445 | "not test_report_exceptions" |
| 440 | "not test_autostart_w_load_shape" | 446 | "not test_report_host" |
| 441 | "not test_autostart_wo_run_time" | 447 | "not test_report_host2" |
| 442 | "not test_percentile_parameter" | 448 | "not test_report_page" |
| 443 | ;; These tests depend on networking. | 449 | "not test_report_page_empty_stats" |
| 444 | "not test_html_report_option" | 450 | "not test_index_with_web_login_enabled_no_user" |
| 445 | "not test_json_schema" | 451 | "not test_index_with_web_login_enabled_valid_user" |
| 446 | "not test_web_options" | 452 | "not test_index_with_https" |
| 447 | ;; These tests fail because of the warning | 453 | "not test_ssl_request_insecure" |
| 448 | ;; "System open file limit '1024' is below | 454 | ;; Fails because of unavailable IPv6 |
| 449 | ;; minimum setting '10000'". | 455 | "not test_constructor" |
| 450 | "not test_autostart_w_run_time" | 456 | ;; Process fails to terminate, which breaks following tests |
| 451 | "not test_skip_logging" | 457 | "not test_processes_ctrl_c" |
| 452 | ;; On some (slow?) machines, the following tests | 458 | ;; These tests depend on networking. |
| 453 | ;; fail, with the processes returning exit code | 459 | "not test_html_report_option" |
| 454 | ;; -15 instead of the expected 42 and 0, | 460 | "not test_json_schema" |
| 455 | ;; respectively (see: | 461 | "not test_locustfile_from_url" |
| 456 | ;; https://github.com/locustio/locust/issues/1708). | 462 | "not test_web_options" |
| 457 | "not test_custom_exit_code" | 463 | ;; These tests fail because of the warning |
| 458 | "not test_webserver" | 464 | ;; "System open file limit '1024' is below |
| 459 | ;; This test fails with "AssertionError: | 465 | ;; minimum setting '10000'". |
| 460 | ;; 'stopped' != 'stopping'". | 466 | "not test_autostart_w_run_time" |
| 461 | "not test_distributed_shape") " and ")))))))) | 467 | "not test_skip_logging" |
| 468 | ;; On some (slow?) machines, the following tests | ||
| 469 | ;; fail, with the processes returning exit code | ||
| 470 | ;; -15 instead of the expected 42 and 0, | ||
| 471 | ;; respectively (see: | ||
| 472 | ;; https://github.com/locustio/locust/issues/1708). | ||
| 473 | "not test_custom_exit_code" | ||
| 474 | "not test_webserver" | ||
| 475 | ;; These are time critical and can fail on busy machines. | ||
| 476 | "not test_distribute_users" | ||
| 477 | "not test_ramp_down_from_100_000_to_0_users_with_50_user_classes_and_1000_workers_and_5000_spawn_rate" | ||
| 478 | "not test_ramp_up_from_0_to_100_000_users_with_50_user_classes_and_1000_workers_and_5000_spawn_rate" | ||
| 479 | ;; This test fails with "AssertionError: | ||
| 480 | ;; 'stopped' != 'stopping'". | ||
| 481 | "not test_distributed_shape") " and ")) | ||
| 482 | #:phases | ||
| 483 | #~(modify-phases %standard-phases | ||
| 484 | ;; The build system attempts to detect the version by spawning git. | ||
| 485 | (add-after 'unpack 'fix-version | ||
| 486 | (lambda _ | ||
| 487 | (let ((tuple (list | ||
| 488 | #$@(match (string-split (version-major+minor+point version) #\.) | ||
| 489 | ((ma mi po) (list ma mi po)))))) | ||
| 490 | (with-output-to-file "locust/_version.py" | ||
| 491 | (lambda _ | ||
| 492 | (display (string-append "\ | ||
| 493 | VERSION_TUPLE = object | ||
| 494 | TYPE_CHECKING = False | ||
| 495 | if TYPE_CHECKING: | ||
| 496 | from typing import Tuple, Union | ||
| 497 | |||
| 498 | VERSION_TUPLE = Tuple[Union[int, str], ...] | ||
| 499 | else: | ||
| 500 | VERSION_TUPLE = object | ||
| 501 | |||
| 502 | version: str | ||
| 503 | __version__: str | ||
| 504 | __version_tuple__: VERSION_TUPLE | ||
| 505 | version_tuple: VERSION_TUPLE | ||
| 506 | |||
| 507 | |||
| 508 | __version__ = \"" #$version "\" | ||
| 509 | version = __version__ | ||
| 510 | __version_tuple__ = (" (car tuple) ", " (cadr tuple) ", " (caddr tuple) ") | ||
| 511 | version_tuple = __version_tuple__ | ||
| 512 | |||
| 513 | "))))) | ||
| 514 | (substitute* "pyproject.toml" | ||
| 515 | (("setuptools = \">=70.0.0\"") "setuptools = \">=67.0.0\"") | ||
| 516 | (("^version =.*") (string-append "version = \"" #$version "\"\n")) | ||
| 517 | (("enable = true") "enable = false")))) | ||
| 518 | (add-before 'check 'increase-resource-limits | ||
| 519 | (lambda _ | ||
| 520 | ;; XXX: Copied from ungoogled-chromium. | ||
| 521 | ;; Try increasing the soft resource limit of max open files to 2048, | ||
| 522 | ;; or equal to the hard limit, whichever is lower. | ||
| 523 | (call-with-values (lambda () (getrlimit 'nofile)) | ||
| 524 | (lambda (soft hard) | ||
| 525 | (when (and soft (< soft 2048)) | ||
| 526 | (if hard | ||
| 527 | (setrlimit 'nofile (min hard 2048) hard) | ||
| 528 | (setrlimit 'nofile 2048 #f)) | ||
| 529 | (format #t | ||
| 530 | "increased maximum number of open files from ~d to ~d~%" | ||
| 531 | soft (if hard (min hard 2048) 2048)))))))))) | ||
| 462 | (propagated-inputs | 532 | (propagated-inputs |
| 463 | (list python-configargparse | 533 | (list python-configargparse |
| 464 | python-flask | 534 | python-flask |
| 465 | python-flask-basicauth | ||
| 466 | python-flask-cors | 535 | python-flask-cors |
| 536 | python-flask-login | ||
| 467 | python-gevent | 537 | python-gevent |
| 468 | python-geventhttpclient | 538 | python-geventhttpclient |
| 469 | python-msgpack | 539 | python-msgpack |
| 470 | python-psutil | 540 | python-psutil |
| 471 | python-pyzmq | 541 | python-pyzmq |
| 472 | python-requests | 542 | python-requests |
| 473 | python-roundrobin | 543 | python-setuptools |
| 544 | python-tomli | ||
| 474 | python-typing-extensions | 545 | python-typing-extensions |
| 475 | python-werkzeug)) | 546 | python-werkzeug)) |
| 476 | (native-inputs | 547 | (native-inputs |
| 477 | (list python-mock | 548 | (list nss-certs-for-test |
| 549 | python-poetry-core | ||
| 550 | python-poetry-dynamic-versioning | ||
| 478 | python-pyquery | 551 | python-pyquery |
| 479 | python-pytest | 552 | python-pytest |
| 480 | python-retry | 553 | python-retry)) |
| 481 | python-setuptools-scm)) | ||
| 482 | (home-page "https://locust.io/") | 554 | (home-page "https://locust.io/") |
| 483 | (synopsis "Distributed load testing framework") | 555 | (synopsis "Distributed load testing framework") |
| 484 | (description "Locust is a performance testing tool that aims to be easy to | 556 | (description "Locust is a performance testing tool that aims to be easy to |
