diff options
author | Ulrich Müller <ulm@gentoo.org> | 2024-06-12 17:28:23 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2024-06-12 17:31:47 +0200 |
commit | dfbc5ab206ba0da4c5fcab2559bb662fb46084a1 (patch) | |
tree | a7a6e886c1192cf9686a423eaa5ceef96eb36f34 /eclass/tests | |
parent | kde-misc/kio-fuse: Bump KFMIN to 6.3.0 for LIBEXECDIR change (diff) | |
download | gentoo-dfbc5ab206ba0da4c5fcab2559bb662fb46084a1.tar.gz gentoo-dfbc5ab206ba0da4c5fcab2559bb662fb46084a1.tar.bz2 gentoo-dfbc5ab206ba0da4c5fcab2559bb662fb46084a1.zip |
eclass/tests: Make *-bench.sh work with reference dc
dc from sys-devel/bc doesn't support the -S option. Set the precision
with the k command instead.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'eclass/tests')
-rwxr-xr-x | eclass/tests/cargo-bench.sh | 4 | ||||
-rwxr-xr-x | eclass/tests/pypi-bench.sh | 4 | ||||
-rwxr-xr-x | eclass/tests/python-utils-bench.sh | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/eclass/tests/cargo-bench.sh b/eclass/tests/cargo-bench.sh index d30b04569905..9347fe339c12 100755 --- a/eclass/tests/cargo-bench.sh +++ b/eclass/tests/cargo-bench.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2023 Gentoo Authors +# Copyright 2023-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -39,7 +39,7 @@ timeit() { local xr avg for x in real user; do xr="${x}[*]" - avg=$(dc -S 3 -e "${ITERATIONS} ${RUNS} * ${!xr} + + / p") + avg=$(dc -e "3 k ${ITERATIONS} ${RUNS} * ${!xr} + + / p") printf '%s %4.0f it/s\n' "${x}" "${avg}" done diff --git a/eclass/tests/pypi-bench.sh b/eclass/tests/pypi-bench.sh index cce93527b729..02855563db3f 100755 --- a/eclass/tests/pypi-bench.sh +++ b/eclass/tests/pypi-bench.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2023 Gentoo Authors +# Copyright 2023-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -39,7 +39,7 @@ timeit() { local xr avg for x in real user; do xr="${x}[*]" - avg=$(dc -S 3 -e "${ITERATIONS} ${RUNS} * ${!xr} + + / p") + avg=$(dc -e "3 k ${ITERATIONS} ${RUNS} * ${!xr} + + / p") printf '%s %4.0f it/s\n' "${x}" "${avg}" done diff --git a/eclass/tests/python-utils-bench.sh b/eclass/tests/python-utils-bench.sh index 7f27adef5509..f718b9f125cb 100755 --- a/eclass/tests/python-utils-bench.sh +++ b/eclass/tests/python-utils-bench.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2023 Gentoo Authors +# Copyright 2023-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -38,7 +38,7 @@ timeit() { local xr avg for x in real user; do xr="${x}[*]" - avg=$(dc -S 3 -e "${ITERATIONS} ${RUNS} * ${!xr} + + / p") + avg=$(dc -e "3 k ${ITERATIONS} ${RUNS} * ${!xr} + + / p") printf '%s %4.0f it/s\n' "${x}" "${avg}" done |