[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/3] xenbaked: properly use time_t in dump_stats()
- To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 19 Aug 2022 07:56:47 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OGpJy9GxXDGSF/wnBk5fJOCd9C2MkPOsGg+CzPiKBN8=; b=ABlawPS00l8E+1dg/KD0EyXtHcMh7vCgzPVAXnfs7fys26ke2eEM6vcgpM7b7RKWsZ0GZbXzvPJo7wMfQN0bd9ZQIvBai+DdZDJemg5ijKMvQ+6VX4fNnao/9y75UuJ5NghUE1U6f0YHQ21EQKN+wrFuXXEYmBC7R+9rpCTqjOuWsWimnvYHqAb24EY9HjYQLv76aRxr4NVRW2EnX5Doqxn9ev03fkX7+6EKZghI6XQ/RMt3SUO69++nZ+6XN3rj6qwnlLS1hqPylXcZHbR+RQF20Hn0VSZ69w/br1gxs9JEDASgOziUgTaV6ixecrBrLn7F+heqwq/44r/wyUzXbw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KMNSuggWy6T/UED8gLJur1ZNDB5SlJI3gVUWuFKJKqPp79rHIwkG8kJ3sglZWofG5/7OdbgATNipFZUwhZmfPFsRVXFUDSCPaGebcsA397TRxV9HJ0xBNgNvUax2UAbeB0uaAj5DdDuDlF/WzNNP03PZ98NhEML+XedpwIYSJ3k/X+kIdj670iQTVfKE3/0iZLvRDsUzBKZprss//9nnLndhesfGSbcQGlFc/YMtXZ/VQ2wpvlNyIjI8rUaLY3knuq3vkvBsYlOleF7O8k4J6DdbQyZoLC7rRzxVqx4XgcOX75FE0QgItcNqc6Z+WJL6mYqZrHUWqS6F6pTcP61Fdg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Fri, 19 Aug 2022 05:56:53 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 18.08.2022 18:34, Anthony PERARD wrote:
> On Thu, Aug 18, 2022 at 04:05:37PM +0200, Jan Beulich wrote:
>> @@ -242,13 +238,11 @@ static void dump_stats(void)
>> smt++;
>> }
>>
>> - printf("processed %d total records in %d seconds (%ld per second)\n",
>> - rec_count, (int)run_time,
>> - run_time ? (long)(rec_count/run_time) : 0L);
>> + printf("processed %d total records in %0f seconds (%0f per second)\n",
>
> Did you want to write "%.0f" or even "%.f" instead of "%0f"? It seems
> that the '0' here mean '0'-padded, but without field width there would
> be nothing to pad. I'm guessing you would want printf to write something
> like "266 seconds" instead of "266.646168 seconds". Am I missing
> something ?
Indeed, I did miss the . in all cases. How embarrassing ...
Jan
|