Annotation Type Setup


  • @Target(METHOD)
    @Retention(RUNTIME)
    public @interface Setup

    Setup marks the fixture method to be run before the benchmark.

    Since fixture methods manage the State lifecycles, Setup can only be declared in State classes. The Setup method will be executed by a thread which has the access to State, and it is not defined which thread exactly. Note that means TearDown may be executed by a different thread, if State is shared between the threads.

    Uses may optionally provide the Level at which the fixture method should run.

    See Also:
    State
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      Level value  
    • Element Detail

      • value

        Level value
        Returns:
        Level of this method.
        See Also:
        Level
        Default:
        org.openjdk.jmh.annotations.Level.Trial