X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id CA1E39FB38C for ; Mon, 11 Sep 2006 14:27:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 00360-08 for ; Mon, 11 Sep 2006 14:27:09 -0300 (ADT) X-Greylist: delayed 00:26:34.834538 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 02E199FB3E5 for ; Mon, 11 Sep 2006 14:27:08 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from smtp.ini.unizh.ch (dns.ini.unizh.ch [130.60.230.185]) by svr4.postgresql.org (Postfix) with ESMTP id 3A8215AFA22 for ; Mon, 11 Sep 2006 17:00:27 +0000 (GMT) Received: from smtp.ini.unizh.ch (localhost [127.0.0.1]) by smtp.ini.unizh.ch (Postfix) with ESMTP id 7319285C5B8 for ; Mon, 11 Sep 2006 19:00:24 +0200 (CEST) Received: by smtp.ini.unizh.ch (Postfix, from userid 499) id 6702C85C67E; Mon, 11 Sep 2006 19:00:24 +0200 (CEST) Received: from acardona.lan.ini.unizh.ch (unknown [172.16.2.13]) (using TLSv1 with cipher EXP1024-RC4-SHA (56/128 bits)) (No client certificate requested) by smtp.ini.unizh.ch (Postfix) with ESMTP id 49C6F85C5B8 for ; Mon, 11 Sep 2006 19:00:21 +0200 (CEST) From: Albert Cardona To: pgsql-jdbc@postgresql.org Subject: about monitoring the input stream Date: Mon, 11 Sep 2006 18:59:50 +0200 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200609111859.51271.acardona@ini.phys.ethz.ch> X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200609/43 X-Sequence-Number: 15761 Following up from http://archives.postgresql.org/pgsql-jdbc/2006-07/msg00052.php I wonder if anything has been done on the subject of monitoring the amount of bytes since the last query? Finally I've digged into the code and put my hands through reflection on the InputStream encapsulated in the PGStream. Problem is, the stream is emptied frequently and I can't find the class responsible for reading it out, so my readings of the available() bytes (in a monitoring thread) underestimate tremendously the amount of bytes actually piped. I understand there is only one InputStream per connection, encapsulated inside a PGStream, created in the ProtocolConnectionImpl. Being able to monitor its the amount of bytes fetched for each query would be really nice! Any help appreciated. Albert -- Albert Cardona Molecular Cell Developmental Biology University of California Los Angeles Tel +1 310 2067376 Programming: http://www.ini.unizh.ch/~acardona/trakem2.html Research: http://www.mcdb.ucla.edu/Research/Hartenstein/ Web design: http://www.pixelets.com