Skip site navigation (1) Skip section navigation (2)

Re: instrumenting the driver

From: John R Pierce <pierce(at)hogranch(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: instrumenting the driver
Date: 2005-06-17 13:59:31
Message-ID: 42B2D743.6080604@hogranch.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
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)

In response to

pgsql-jdbc by date

Next:From: PrasanthDate: 2005-06-17 15:15:10
Subject: Re: Postgresql-JDBC connectivity
Previous:From: Kevin GrittnerDate: 2005-06-17 13:53:35
Subject: Re: instrumenting the driver

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group