From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16612 invoked from network); 5 Feb 2023 08:52:20 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 5 Feb 2023 08:52:20 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1675587140; b=DWfv4jVaqE/DX5y3jJ1faylRjEOBaj5LOv36omQaPD/FT/Yh5WMRmykP2LrCKzBg3dtMuluMnN QQXliNZbovKqK5iPGFeYJCiYe4nXP7L5ToDIGS6eiRaqyotjI5GQkpjCLTywTGtsfL67YxWi1D BXIehxOVpFgcInwyvukWmnHsVG5yhxhChVv4F14FKAcmSAsIXjkpnRO9DeRv377cWNYGPsmAeO 1WP8e6skqtbyLiXAYxV5CBQuY5noAIeyUBS7efCxXT+Yv9bGfZeYZS1Yw6OqrLFYVxVBuiFSsm W2Q8ZdXMbpFQ7ztww+bPixDCzlTweCIHpfXBdLQuf7v+DA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out5-smtp.messagingengine.com) smtp.remote-ip=66.111.4.29; dkim=pass header.d=daniel.shahaf.name header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1675587140; bh=SM/wyABEUtBbLFyqonCHA8m+ZWpl5dBs/Jnc+SyA22M=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:To:From:Date:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=XK0shPCzVUB+oqxeHBnyJxxql1PrltIY9vFjavP6byFPsw0Zac1Rujt4NYEojFhJ/Iz9Bba1Fv jMg+wF2XtBJQlfs0sbGDhNZgk4CLu78vbDuxfgQF188tF5mVI/xBYqqkpkesGVh04HVLMQDttg LR1pjhZXraIdoXzJXjYjXGvlZ4DeddgbIByk6RhDBOW/Rb46SVjgiCjrzNIWUpZ8ab6wj7fnj6 VjCAaDM2hnh5hzf0H2Bo13lzFZXYLwT/D2l1AGkAiZ8g2D1mnNV9NYecgCSONWNy2/Ao1bdYqh X6PZFml6CT3/gt+cIuDMpxso5K42Ev+Teo4rS7Aiz7AybA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=dzIWWHJiFOll7+QUy1borVyHjZzfOPZmA+swjaY4EZw=; b=Mhd4u4EPmZta2IfonKZJChRXY7 vpBlkwnJvxUndJzkbRy3nJFAUgTwWgeRvZaWuy2XVMXo4vV4QWcDFyIbZch04O82mes1VWTYGK1dl tT6znFxvMIZRd5ybE7f2nlEQxYu/7Q43/JRHrgKOp/Q2T05J3nKi3Nj3CviISdxb4V6+0fKr414Qj s/IkHYxN7AELSd84M5gtDsYVP/Ffa1xfJ8f6XcdBKtiUyjKqpkXBXGNwFGbP078LIidv+aBZSveSj JJtPJUELdTq+kXf94zII5Sdnf65MiZmLi2vqEtInw2UHS14qDbUR94HqidZD8k5v/VfncgUVKqR/8 L+U7DaJQ==; Received: by zero.zsh.org with local id 1pOal0-000EJ5-3i; Sun, 05 Feb 2023 08:52:18 +0000 Authentication-Results: zsh.org; iprev=pass (out5-smtp.messagingengine.com) smtp.remote-ip=66.111.4.29; dkim=pass header.d=daniel.shahaf.name header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from out5-smtp.messagingengine.com ([66.111.4.29]:60685) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1pOaVv-000DOn-ET; Sun, 05 Feb 2023 08:36:45 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 80B665C00D6; Sun, 5 Feb 2023 03:36:41 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 05 Feb 2023 03:36:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to; s=fm2; t=1675586201; x=1675672601; bh=dzIWWHJiFOll7+QUy1borVyHj ZzfOPZmA+swjaY4EZw=; b=rn2oxBs7TzIX3DPYYUsaSj5HaUwt+gWRdTXpCHF8z HF5cQUuYweZtN3Dm2o6+NG8d0hG4/JLxnUhmYC9PcxiPpqSCKIvBrqY/IpoJ9Qp4 9Hqe1q0epzA16il1qeIr+U8CzHGSuP+mjgerE9oMan8aL+Ih1gyY/WhDQOcRrfXM eKeh5S4lbpJv2rpeu6Jil2AiQO4LivQi7fB3LRTfjiKCBXxFElKlDxVYTuWdiqrA xSt6NAPwLyEDB2xWIdp2MNSciSkhtUWLiZbNIdDusiSMxYKiW/CRjpCts0bIMUyu lrIjhTnT5UbOm2yVvwTXjcwhLLdb7nqEBg6tGs+gPVvuA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1675586201; x=1675672601; bh=d zIWWHJiFOll7+QUy1borVyHjZzfOPZmA+swjaY4EZw=; b=Jr2d5E32ShTl5457A 5TlhogTCJkoYu+D0+aehobci1N3RxuHvO5BVaEDy0NgV9NNrtoe15PPUMLGVEFTG +gmLjLfHqOpuarFzTaT4LD8uSl3v1c86w9j6qj5MVcHaPKHCKoAid1mreLFHd1bv oLyj/MDPqZDcQvnyAijsM1XrudOtxTnA88Mdo+a0s3eXpxBUyxDZkrP2IuhXSjQt UR0BkY+Zc+s5rxy+FPY4S2HaAAEGl5d7urSS6+nA+MXH3CiMlAeX9JEJnMV+S41N QfPn6QJez2+vuOo/Pjl7XtoS//ru3AxrXm469r8A80gOBee1hPVjwmjoB7y1MpXn pnJVg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudegfedguddulecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtugfgjggfse htkedttddtredunecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceougdrshesuggr nhhivghlrdhshhgrhhgrfhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpefgtdffveejue ettddtgedvvefhgedtteelieeuffdutdduheduheduieffjeefgfenucffohhmrghinhep ohhuthdrrhhunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepugdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i425e4195:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 5 Feb 2023 03:36:41 -0500 (EST) Received: by tarpaulin.shahaf.local2 (Postfix, from userid 1000) id 4P8jRW50snztg; Sun, 5 Feb 2023 08:36:39 +0000 (UTC) Date: Sun, 5 Feb 2023 08:36:39 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: Re: Documentation of the TIMEFMT variable Message-ID: <20230205083639.GB7704@tarpaulin.shahaf.local2> References: <20230203205244.bfq7a3zqcs64rtbe@chazelas.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230203205244.bfq7a3zqcs64rtbe@chazelas.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Seq: 51359 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: Stephane Chazelas wrote on Fri, Feb 03, 2023 at 20:52:44 +0000: > 2023-02-02 11:33:56 -0800, Bart Schaefer: > > On Thu, Feb 2, 2023 at 8:54 AM trillian > > wrote: > > > > > > The documentation of TIMEFMT says that %M means "The maximum memory the > > > process had in use at any time in kilobytes", but the actual value shown > > > is in megabytes. (The kernel reports it in kilobytes and zsh divides it > > > by 1024 again.) > > > > This has been reported twice before, although after looking at the > > previous two reports I'm not sure if this is a documentation error or > > a coding error or (OS-dependently) both. Anyone? > > A portability issue. Doc is correct, but code is only correct on > Darwin/macos. GNU time's autoconf has some info on the subject > IIRC. > > It's been reported many times here. See workers/45489, > workers/42363, workers/30399, workers/49145. > > macos/darwin is the odd one out. ru_maxrss was already in > kibibytes in the original getrusage() implementation in BSD4.2 > in 1985. Another consideration: the doc states that %X and %D are also given in KB. Assuming that for these two the implementation does in fact match the docs, changing the implementation of %M to match the docs would result in %M/%X/%D all expanding to values in KB, which seems preferable to having some of them expand to values in KB and some to values in MB. Cheers, Daniel