java-使用@Duration批注时,BTrace提供什么时间单位?米利斯,微米还是纳米?在文档中找不到它
作者:互联网
查看方法“ methodExit”.参数“ @Duration long time”中保存什么时间单位?
package com.sun.btrace.samples;
import com.sun.btrace.Profiler;
import com.sun.btrace.annotations.*;
import static com.sun.btrace.BTraceUtils.*;
import java.awt.EventQueue;
import java.awt.AWTEvent;
import java.awt.event.FocusEvent;
@BTrace
public class AllMethods {
@OnMethod(
clazz="java.awt.EventQueue",
method="dispatchEvent",
location=@Location(Kind.RETURN))
public static void methodExit(@Duration long time, @ProbeMethodName String pmn) {
println(pmn + " " + (time / 1000000));
}
}
解决方法:
持续时间以纳秒为单位.
Javadoc缺少此信息-我已为此提交了issue.如果您想挖掘源代码this place是一个好的开始.
标签:profiling,java,btrace 来源: https://codeday.me/bug/20191026/1935153.html