From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgbench stats per script & other stuff |
Date: | 2015-12-15 11:41:44 |
Message-ID: | alpine.DEB.2.10.1512151237030.25544@sto |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Artur Zakirov | 2015-12-15 11:50:06 | Re: Allow replication roles to use file access functions |
Previous Message | Yang, Leo | 2015-12-15 09:54:16 | "pg_upgrade" cannot write to log file pg_upgrade_internal.log |