欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  资讯频道

Java Simon 1.0, monitoring API 发布

程序员文章站 2022-05-16 17:22:58
...
Java Simon是一个简单的监控API,可以让你更好的监控Java应用程序。你可以在应用程序里面插入Simon的调用接口,从而可以对应用程序进行完善的监控,例如方法执行时间,执行次数统计等等。

Simon详细的功能介绍如下:

引用

In most cases you'll probably use Stopwatch to measure time spans - so let's briefly check what it can do:

* it can measure time splits, parallel measurement is supported;
* it provides total time, number of time splits, tracks max/min time, time stamp when extremes were measured, deviation, ...;
* and like every Simon it tracks first/last usage time stamp and enable/disable/reset features are also available.

One additional bonus that comes with the API is JDBC Proxy Driver that out of the box provides nice performance overview of your DB layer.

Why we brought in a new API when there is JaMON available? Well, we tried it with JaMON but than we wanted to crucial things that JaMON doesn't provide:

* we wanted to measure time in nanoseconds (hence JDK 1.5 or higher is required);
* we wanted all monitors to be organized somehow - so we implemented tree hierarchy similar to java.util.logging API - this provides powerful features like enable/disable/reset of the whole subtrees of this monitor hierarchy.

Version 1.0 contains core functionality and we realize it lacks many important features in the bigger picture of application monitoring. Our plans in the future covers:

* Declarative Simon configuration.
* JMX access to Simons, their values and enable/disable features.
* Sampling, collecting, agregating with persistence backend (file/DB).
...and probably more, but not all in the next major release. ;-)
相关标签: Java performance