Module jdk.jfr
Package jdk.jfr

Annotation Interface Threshold


@Target(TYPE) @Inherited @Retention(RUNTIME) public @interface Threshold
事件注解,指定事件不记录的默认持续时间下限(例如,"20 毫秒")。
自 JDK 9 起:
9
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    阈值(例如,"20 毫秒")。
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    用于配置事件阈值的设置名称 "threshold"
  • Field Details

    • NAME

      static final String NAME
      用于配置事件阈值的设置名称 "threshold"
      参见:
  • Element Details

    • value

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

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

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

      示例值包括 "0 ns""10 ms""1 s"

      返回:
      阈值,默认为 "0 ns",非 null
      默认值:
      "0 ns"