mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user