You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Josh <ge...@gmail.com> on 2007/06/07 15:51:00 UTC

How to capture time spent at DB?

Hello,

I am using Spring 1.28 and Ibatis 2.1.7.  I am currently logging my total
total response time and service layer response time.  I would also like to
capture the time spent at the DB.  Can anyone provide any suggestions on how
to do this?

thanks,

josh

Re: How to capture time spent at DB?

Posted by Cimballi <ci...@cimballi.net>.
Hi,

You can use a JDBC proxy like p6spy : http://www.p6spy.com/.

Cimballi

Re: How to capture time spent at DB?

Posted by Larry Meadors <lm...@apache.org>.
Not that I know of, but If you do decide to do it, we should put it on
the WIKI - I suspect that you're not the only one who'd use it. :-)

If you *really* wanted to be a stud, you'd check out the iBATIS svn,
and write it so that we could add it to the next release - we could to
time logging like we do sql logging. You may want to take a look at
how we do that and see if you could do it the same way...we
essentially add the proxies under the covers depending on how logging
is configured.

Larry


On 6/7/07, Josh <ge...@gmail.com> wrote:
> Larry,
>
> I like the proxy idea.  I can use spring/aop to create a proxy and capture
> the calls to the sqlmapclient.  Has anyone do this already?
>
> -Joshua
>
>
>
> On 6/7/07, Larry Meadors <lm...@apache.org> wrote:
> > Your most accurate results will come from the database logging
> > facilities from the database vendor.
> >
> > If you wanted, you could create a proxy on the sqlmapclient to log
> > times, but I think the results would be questionable, depending on
> > what you are trying to capture.
> >
> > Larry
> >
> >
> > On 6/7/07, Josh < gemini929@gmail.com> wrote:
> > > Hello,
> > >
> > > I am using Spring 1.28 and Ibatis 2.1.7.  I am currently logging my
> total
> > > total response time and service layer response time.  I would also like
> to
> > > capture the time spent at the DB.  Can anyone provide any suggestions on
> how
> > > to do this?
> >
>
>

Re: How to capture time spent at DB?

Posted by Josh <ge...@gmail.com>.
Larry,

I like the proxy idea.  I can use spring/aop to create a proxy and capture
the calls to the sqlmapclient.  Has anyone do this already?

-Joshua


On 6/7/07, Larry Meadors <lm...@apache.org> wrote:
>
> Your most accurate results will come from the database logging
> facilities from the database vendor.
>
> If you wanted, you could create a proxy on the sqlmapclient to log
> times, but I think the results would be questionable, depending on
> what you are trying to capture.
>
> Larry
>
>
> On 6/7/07, Josh <ge...@gmail.com> wrote:
> > Hello,
> >
> > I am using Spring 1.28 and Ibatis 2.1.7.  I am currently logging my
> total
> > total response time and service layer response time.  I would also like
> to
> > capture the time spent at the DB.  Can anyone provide any suggestions on
> how
> > to do this?
>

Re: How to capture time spent at DB?

Posted by Larry Meadors <lm...@apache.org>.
Your most accurate results will come from the database logging
facilities from the database vendor.

If you wanted, you could create a proxy on the sqlmapclient to log
times, but I think the results would be questionable, depending on
what you are trying to capture.

Larry


On 6/7/07, Josh <ge...@gmail.com> wrote:
> Hello,
>
> I am using Spring 1.28 and Ibatis 2.1.7.  I am currently logging my total
> total response time and service layer response time.  I would also like to
> capture the time spent at the DB.  Can anyone provide any suggestions on how
> to do this?

Re: How to capture time spent at DB?

Posted by ay...@jpmchase.com.
Can't you just put some log statements around your calls to ibatis? Ibatis 
logging itself might have some options to enable this





Josh <ge...@gmail.com> 
06/07/2007 09:51 AM
Please respond to
user-java@ibatis.apache.org


To
user-java@ibatis.apache.org
cc

Subject
How to capture time spent at DB?






Hello,
 
I am using Spring 1.28 and Ibatis 2.1.7.  I am currently logging my total 
total response time and service layer response time.  I would also like to 
capture the time spent at the DB.  Can anyone provide any suggestions on 
how to do this? 
 
thanks,
 
josh 



-----------------------------------------
This communication is for informational purposes only. It is not
intended as an offer or solicitation for the purchase or sale of
any financial instrument or as an official confirmation of any
transaction. All market prices, data and other information are not
warranted as to completeness or accuracy and are subject to change
without notice. Any comments or statements made herein do not
necessarily reflect those of JPMorgan Chase & Co., its subsidiaries
and affiliates.

This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase &
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.

Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to UK legal entities.