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(); }