Re: [PATCH] pgbench: improve \sleep meta command

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: 'miyake_kouta' <miyake_kouta(at)oss(dot)nttdata(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] pgbench: improve \sleep meta command
Date: 2021-03-18 07:32:37
Message-ID: c215e3da-58dc-8378-dde2-aa3e14a13b7d@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021/03/17 16:40, kuroda(dot)hayato(at)fujitsu(dot)com wrote:
> Dear Fujii-san,
>
> Thank you for updating the patch.

Thanks for the review!

> I understand that you don't want to change the current specification.
>
> ```diff
> + if (usec == 0)
> + {
> + char *c = var;
> +
> + /* Skip sign */
> + if (*c == '+' || *c == '-')
> + c++;
> ```
>
> In my understanding the skip is not necessary, because
> plus sign is already removed in the executeMetaCommand() and minus value can be returned by atoi().

Yes, you're right. I removed that check from the patch.
Attached is the updated version of the patch.

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Attachment Content-Type Size
v04_pgbench_sleep.patch text/plain 1.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message tsunakawa.takay@fujitsu.com 2021-03-18 07:34:36 RE: libpq debug log
Previous Message iwata.aya@fujitsu.com 2021-03-18 07:18:42 RE: libpq debug log