Recently, a new java profiling tool (http://perf4j.codehaus.org/ ) gets more and more attentions. It is pretty interesting and lightweight tool and may give us more thoughts on our profiling log framework.
- The goal of the Perf4j project
Perf4J is a set of utilities for calculating and displaying perfomance statistics for Java code. For developers who are familiar with logging frameworks such as log4j or java.util.logging, an analogy helps to describe Perf4J:
Perf4J is to System.currentTimeMillis() as log4j is to System.out.println() - Feature List:
- A simple stop watch mechanism for succinct timing statements.
- A command line tool for parsing log files that generates aggregated statistics and performance graphs.
- Easy integration with the most common logging frameworks and facades: log4j, java.util.logging, Apache Commons Logging and SLF4J.
- Custom log4j appenders to generate statistics and graphs in a running application (custom java.util.logging handlers coming soon).
- The ability to expose performance statistics as JMX attributes, and to send notifications when statistics exceed specified thresholds.
- A servlet for exposing performance graphs in a web application.
- A @Profiled annotation and a set of custom aspects that allow unobstrusive timing statements when coupled with an AOP framework such as AspectJ or Spring AOP.
- An extensible architecture.
- simple demo
http://perf4j.codehaus.org/images/meanChart.png
http://perf4j.codehaus.org/images/tpsChart.png
Perf4J是一款轻量级的Java性能剖析工具,它为Java代码提供了性能统计计算和展示功能。该工具类似于log4j之于System.out.println(),通过简洁的计时机制和命令行工具来解析日志文件,生成聚合统计和性能图表。Perf4J易于与常见的日志框架集成,并支持通过AOP方式无侵入地添加性能监控。
1772

被折叠的 条评论
为什么被折叠?



