public inbox for [email protected]  
help / color / mirror / Atom feed
From: Daniel Gustafsson <[email protected]>
To: Krishnakumar R <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Small patch modifying variable name to reflect the logic involved
Date: Fri, 15 Sep 2023 19:50:51 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAPMWgZ9f9o8awrQpjo8oxnNQ=bMDVPx00NE0QcDzvHD_ZrdLPw@mail.gmail.com>
	<[email protected]>

> On 14 Sep 2023, at 11:30, Daniel Gustafsson <[email protected]> wrote:
> 
>> On 14 Sep 2023, at 08:28, Krishnakumar R <[email protected]> wrote:
> 
>> Please find a small patch to improve code readability by modifying
>> variable name to reflect the logic involved - finding diff between end
>> and start time of WAL sync.
> 
> -	INSTR_TIME_ACCUM_DIFF(PendingWalStats.wal_sync_time, duration, start);
> +	INSTR_TIME_SET_CURRENT(end);
> +	INSTR_TIME_ACCUM_DIFF(PendingWalStats.wal_sync_time, end, start);
> 
> Agreed, the duration is the result of the INSTR_TIME_ACCUM_DIFF calculation,
> not what's stored in the instr_time variable.

And done, with a small fixup to handle another occurrence in the same file.

--
Daniel Gustafsson







view thread (4+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Small patch modifying variable name to reflect the logic involved
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox