Re: pgbench stats per script & other stuff

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: pgbench stats per script & other stuff
Дата
Msg-id alpine.DEB.2.10.1512151237030.25544@sto
обсуждение исходный текст
Ответ на Re: pgbench stats per script & other stuff  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: pgbench stats per script & other stuff  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
>> "sum" is a double so count is converted to 0.0, 0.0/0.0 == NaN, hence the
>> comment.
>
> PG code usually avoids that, and I recall static analyze tools type
> coverity complaining that this may lead to undefined behavior. While I
> agree that this would lead to NaN...

Hmmm. In this case that is what is actually wanted. If there is no 
transaction, the tps or average latency or whatever is "NaN", I cannot 
help it, and IEEE 754 allow that. So in this case the tool is wrong if it 
complains, or at least we are right to ignore the warning. Maybe there is 
some special comment to say "ignore this warning on the next line" if it 
occurs, if this is an issue.

-- 
Fabien.



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

Предыдущее
От: Andreas Karlsson
Дата:
Сообщение: Check for interrupts in bf and xdes crypt()
Следующее
От: Artur Zakirov
Дата:
Сообщение: Re: Allow replication roles to use file access functions