pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
instrumenting the driver
3+ messages / 3 participants
[nested] [flat]

* instrumenting the driver
@ 2005-06-17 11:59  Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Dave Cramer @ 2005-06-17 11:59 UTC (permalink / raw)
  To: pgsql-jdbc

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.

Any comments?


Dave Cramer
davec@postgresintl.com
www.postgresintl.com
ICQ #14675561
jabber davecramer@jabber.org
ph (519 939 0336 )




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: instrumenting the driver
@ 2005-06-17 13:53  Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 0 replies; 3+ messages in thread

From: Kevin Grittner @ 2005-06-17 13:53 UTC (permalink / raw)
  To: pg@fastcrypt.com; pgsql-jdbc

The first thing that comes to mind is to check the
DriverManager.getLogWriter() value at key points in the code.  If not
null, log timing info along with other logging/tracing info.  Would this
satisfy the request?
 
-Kevin
 
 
>>> Dave Cramer <pg@fastcrypt.com> 06/17/05 6:59 AM >>>
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.

Any comments?


Dave Cramer
davec@postgresintl.com
www.postgresintl.com
ICQ #14675561
jabber davecramer@jabber.org
ph (519 939 0336 )


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: instrumenting the driver
@ 2005-06-17 13:59  John R Pierce <pierce@hogranch.com>
  parent: Dave Cramer <pg@fastcrypt.com>
  0 siblings, 0 replies; 3+ messages in thread

From: John R Pierce @ 2005-06-17 13:59 UTC (permalink / raw)
  To: Dave Cramer <pg@fastcrypt.com>; +Cc: 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)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-06-17 13:59 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-06-17 11:59 instrumenting the driver Dave Cramer <pg@fastcrypt.com>
2005-06-17 13:59 ` John R Pierce <pierce@hogranch.com>
2005-06-17 13:53 Re: instrumenting the driver Kevin Grittner <Kevin.Grittner@wicourts.gov>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox