使用@Duration 注解时,BTrace 提供了哪些时间单位?毫、微米或纳米?在文档中找不到
What time units are provided by BTrace when using @Duration annotation? Millis, micros or maybe nanos? Cannot find it in the documentation
查看方法'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 for that. If you want to dig in the sources this place 是一个好的开始。
查看方法'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 for that. If you want to dig in the sources this place 是一个好的开始。