Cosmetic note: hit rates in logs - Mailing list pgsql-hackers

From Jeroen T. Vermeulen
Subject Cosmetic note: hit rates in logs
Date
Msg-id 5648.125.24.221.250.1171434532.squirrel@webmail.xs4all.nl
Whole thread Raw
List pgsql-hackers
Just noticed a small cosmetic point in the logs when logging statement
performance data: if a statement accesses 0 blocks, the "hit rate" is
given as 0%.

I can see that that makes sense mathematically--insofar as 0/0 makes
mathematical sense at all--but wouldn't it be more helpful to represent
this as a 100% hit rate?

I guess computing hit rate as the limit of 0/x is as valid as computing
the limit of x/x (with x being the number of accesses that approaches
zero).  But when I look at the logs I find myself going "low hit rate
here--oh wait, that's for zero accesses" all the time.  Or would the
change make other people "good hit rate here--oh wait, that's for zero
accesses"?


Jeroen




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Re: [BUGS] BUG #2724: Could not check connection status with "ssl=on"
Next
From: "Matt Miller"
Date:
Subject: "anyelement2" pseudotype