Re: pgbench stats per script & other stuff

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pgbench stats per script & other stuff
Дата
Msg-id CAB7nPqQVQFXtM_sQPMvF1thU_5YrBxJ_Wgjx=qeA7kzLjnbXnA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgbench stats per script & other stuff  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: pgbench stats per script & other stuff  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
On Wed, Dec 16, 2015 at 4:09 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> Yeah, that's actually fine. I just had a look at Windows stuff, and
> things seem to be correct on this side for double:
> https://msdn.microsoft.com/en-us/library/aa691373%28v=vs.71%29.aspx
> And then I also had a look at src/port/snprintf.c, where things get
> actually weird when no transactions are run for a script (emulated
> with 2 scripts, one with @10000 and the second with @1):
>  - 0 transactions (0.0% of total, tps = 0.000000)
>  - latency average = -1.#IO ms
>  - latency stddev = -1.#IO ms
> And it seems that this is a bug in fmtfloat() because it does not
> handle nan values correctly. Others, any thoughts about that?
> It is possible to address things within your patch by using isnan()
> and print another message but I think that we had better patch
> snprintf.c if my analysis is right.

FWIW, I just had a closer look at this portion and I arrived at the
conclusion that sprintf implementation on Windows is just broken as it
is not able to handle appropriately inf or nan as exceptions.
fmtfloat@src/port/snprintf.c relies on the system's implementation of
sprintf to handle those exceptions, however even directly calling
sprintf results in the same weird output, inf showing up as "1.#IO"
and nan as "-1.#IO". Anyone, feel free to disagree if I am missing
something.

Still, it would be cool to have better error message when there is no
value to show up to the user, like "no latency average" or "undefined
latency average". That would be more elegant, and the patches proposed
still lack that.
-- 
Michael



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Grzegorz Sampolski
Дата:
Сообщение: Re: pam auth - add rhost item
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: 9.5rc1 brin_summarize_new_values