模块 jdk.jfr
 jdk.jfr

注解阈值


@Target (TYPE ) @Inherited @Retention (RUNTIME ) public @interface Threshold
事件注解,指定不记录事件的默认持续时间(例如,"20 ms")。
自从:
9
  • 可选元素摘要

    可选元素
    修饰符和类型
    可选元素
    描述
    阈值(例如,"20 ms")。
  • 字段摘要

    字段
    修饰符和类型
    Field
    描述
    static final String
    设置名称 "threshold" 用于配置事件阈值。
  • 字段详细信息

    • NAME

      static final String  NAME
      设置名称 "threshold" 用于配置事件阈值。
      参见:
  • 元素详细信息

    • value

      String  value
      阈值(例如,"20 ms")。

      Long 值的 String 表示后跟空格和以下单位之一:

      "ns"(纳秒)
      "us"(微秒)
      "ms"(毫秒)
      "s"(秒)
      "m"(分钟)
      "h"(小时)
      "d"(天)

      示例值为 "0 ns""10 ms""1 s"

      返回:
      阈值,默认 "0 ns" ,而不是 null
      默认:
      "0 ns"