开发者

Persistent instrumentation for Java

开发者 https://www.devze.com 2023-02-12 07:42 出处:网络
We have an application at wor开发者_开发百科k that we\'d like to monitor for performance. Actually, what we want to monitor is not our app\'s performance, but things like response time for external we

We have an application at wor开发者_开发百科k that we'd like to monitor for performance. Actually, what we want to monitor is not our app's performance, but things like response time for external web services we invoke.

Years ago, using ATG Dynamo, you could instrument your code with something like...

Performance.monitorStart("my.operation");
try {
  // code goes here
}
finally {
  Performance.monitorEnd("my.operation");
}

; this generated a nice report of the time spent in diverse operations, in a friendlier way than hprof. Ideally, the time should be persisted (db or otherwise).

I recall seeing somewhere (here? Dzone? TSS?) about a new library that does this, but googling reveals nothing.

Thoughts?

Alex


What you're describing sounds a lot like Perf4J.


Springsource TC Server (which is a Tomcat++) with Insight enabled has been helpful to me

It will time your entire call-stack and give you nice reports. Here's a screencast http://www.youtube.com/watch?v=nBqSh7nVNzc


Since you are already showing an example where code changes are involved, you could simply roll your own using your probably existing logging facility.

Another option would be JMX beans for live statistics - this option is often used together with a 'professional' monitoring facility which aggregates these statistics.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号