@BTrace
public class App
{
@TLS
private static long startTime = 0;
@OnMethod(clazz = "com.rrc.finance.service.FluidService", method = "queryRuntimeTasks")
public static void startMethod() {
startTime = timeMillis();
}
@OnMethod(clazz = "com.rrc.finance.service.FluidService", method = "queryRuntimeTasks", location = @Location(Kind.RETURN))
public static void endMethod() {
println(strcat("the class method execute time=>", str(timeMillis() - startTime)));
println("-------------------------------------------");
}
@OnMethod(clazz = "com.rrc.finance.service.FluidService", method = "queryRuntimeTasks", location = @Location(Kind.RETURN))
public static void traceExecute(@ProbeClassName String name, @ProbeMethodName String method, int sleepTime) {
println(strcat("the class name=>", name));
println(strcat("the class method=>", method));
println(strcat("the class method params=>", str(sleepTime)));
}
}
btrace 官方下载https://kenai.com/projects/btrace/downloads/directory/releases
btrace
最新推荐文章于 2020-08-15 23:24:48 发布