X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 48D145280D for ; Fri, 17 Jun 2005 10:59:45 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 29853-07 for ; Fri, 17 Jun 2005 13:59:40 +0000 (GMT) Received: from hogranch.com (hogranch.com [66.117.128.240]) by svr1.postgresql.org (Postfix) with ESMTP id 7C02552968 for ; Fri, 17 Jun 2005 10:59:38 -0300 (ADT) Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id j5HDxVs01977; Fri, 17 Jun 2005 06:59:31 -0700 Message-ID: <42B2D743.6080604@hogranch.com> Date: Fri, 17 Jun 2005 06:59:31 -0700 From: John R Pierce User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dave Cramer Cc: List Subject: Re: instrumenting the driver References: <204ABB29-6127-4730-88C4-D1FAB604AD0C@fastcrypt.com> In-Reply-To: <204ABB29-6127-4730-88C4-D1FAB604AD0C@fastcrypt.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200506/93 X-Sequence-Number: 13055 Dave Cramer wrote: > There has been a request to instrument the driver for measuring timing. > > One mechanism that comes to mind is to allow one listener in execute, > etc. Or to simply measure it ourselves. I rather like the `dtrace` approach in Solaris 10.. It provides instrument hooks for all kinds of stuff but the hooks do nothing if nothing has hooked them (presumably implemented with an inline macro of some kind). The dtrace utility has a wide range of timing, counting, classification, etc statistics gathering capabilities. Solaris 10 has hooks on virtually every system routine entry and exit, as well as many other things. Now, obviously, thats a lot more sophisticated than we'd want to bite off in a jdbc driver, but the idea of a generalized hook on entry and exit of each major method is a good one, the user routine that hooks these could classify the statement being executed if it wanted to (at its own expense, naturally)