From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1641772-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 5A94215817D
	for <garchives@archives.gentoo.org>; Wed, 12 Jun 2024 15:32:04 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id A1E92E2B46;
	Wed, 12 Jun 2024 15:32:03 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 838B7E2B46
	for <gentoo-commits@lists.gentoo.org>; Wed, 12 Jun 2024 15:32:03 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id ACC8A33BDE1
	for <gentoo-commits@lists.gentoo.org>; Wed, 12 Jun 2024 15:32:02 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id BAE67119
	for <gentoo-commits@lists.gentoo.org>; Wed, 12 Jun 2024 15:32:00 +0000 (UTC)
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" <ulm@gentoo.org>
Message-ID: <1718206307.dfbc5ab206ba0da4c5fcab2559bb662fb46084a1.ulm@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/tests/
X-VCS-Repository: repo/gentoo
X-VCS-Files: eclass/tests/cargo-bench.sh eclass/tests/pypi-bench.sh eclass/tests/python-utils-bench.sh
X-VCS-Directories: eclass/tests/
X-VCS-Committer: ulm
X-VCS-Committer-Name: Ulrich Müller
X-VCS-Revision: dfbc5ab206ba0da4c5fcab2559bb662fb46084a1
X-VCS-Branch: master
Date: Wed, 12 Jun 2024 15:32:00 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: ebeb17cf-c79d-475b-9635-9c7e09130590
X-Archives-Hash: 53c8f006ac324ea61d9eef97ac831dc3

commit:     dfbc5ab206ba0da4c5fcab2559bb662fb46084a1
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 12 15:28:23 2024 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Jun 12 15:31:47 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfbc5ab2

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 <AT> gentoo.org>

 eclass/tests/cargo-bench.sh        | 4 ++--
 eclass/tests/pypi-bench.sh         | 4 ++--
 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