Caudit应用性能跟踪库
Caudit 是一个简单的库用来记录应用程序的性能、健康状态和运行相关的统计信息。它具有两种基本的审核类型:秒表和数量。秒表是你跟踪特定操作所经过的时间的表,数量是你要监视的变量。
示例代码:
//Mapping audit to integer is for performance(string comparison vs integer comparison)
private final static int BASIC_STOPWATCH_ID = Audits.mapAudit("example.basicStopwatch");
public void tryOut(){
final Stopwatch stopwatch = Audits.getBasicStopwatch(BASIC_STOPWATCH_ID);
stopwatch.start();
doSomeWork();
stopwatch.stop();
}评论
