7 messages in org.postgresql.pgsql-jdbcRe: how to monitor the amount of byte...
FromSent OnAttachments
Albert CardonaJul 11, 2006 11:27 am 
Nicholas E. WakefieldJul 11, 2006 8:17 pm 
Oliver JowettJul 11, 2006 10:10 pm 
Albert CardonaJul 12, 2006 8:55 am 
Oliver JowettJul 12, 2006 2:45 pm 
Albert CardonaJul 12, 2006 2:59 pm 
Oliver JowettJul 12, 2006 3:13 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: how to monitor the amount of bytes fetched in a executeQuery()Actions...
From:Oliver Jowett (oli@opencloud.com)
Date:Jul 12, 2006 3:13:51 pm
List:org.postgresql.pgsql-jdbc

Albert Cardona wrote:

I will have a look at the code myself but I'm not familiar with it -you say it's at PGconnection class?

org.postgresql.PGConnection is our extension interface that applications use to get access to driver-specific features. The actual implementation would go in AbstractJdbc2Connection which would delegate to the protocol-level code in org/postgresql/core/* to get stats from the underlying connection. Looks like you may need to play with PGStream so it actually tracks the byte count, unless one of the wrapping streams already does that.

app code would look something like this:

Connection c = /* get connection */; if (c instanceof PGConnection) { PGConnection pgc = (PGConnection)c; long byteCount = pgc.getInputByteCount(); // or whatever }

-O