|From:||Alexander Pyhalov <alp(at)rsu(dot)ru>|
|To:||Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>|
|Cc:||dmp <danap(at)ttc-cmc(dot)net>, pgsql-jdbc(at)postgresql(dot)org|
|Subject:||Re: Get bytes sent to client|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
I've just made new patch - extended BufferedOutputStream and
VisibleBufferedInputStream, as you suggested. It works, and results are
comparable with tcpdump data (for received traffic). For sent traffic
they are incorrect, because I can't account all ACK, but only PGSQL
It's suprising, that received traffic is more then tcpdump shows ( 2%,
butt more). I thought it would be a bit smaller then actual data.
However, this data gives good approximation (2% for 100MB traffic is not
Craig Ringer wrote:
> On 18/12/2009 2:34 PM, Alexander Pyhalov wrote:
>> I've made patch for Postgres JDBC driver. Now driver accounts bytes
>> sent/received from client ing PGStream.
> Can't you extend or wrap the pg_input / pg_output streams to do the
> accounting in their read(...) / write(...) method instead? The way
> you've done it is rather fragile and is very prone to bitrot as other
> parts of the driver are changed.
> Craig Ringer
системный администратор ЮГИНФО ЮФУ.
|Next Message||Maciek Sakrejda||2009-12-21 01:24:39||Re: Cheapest way to poll for notifications? & Driver improvement question re SSL and notify|
|Previous Message||Craig Ringer||2009-12-19 07:24:53||Re: Cheapest way to poll for notifications?|