Annotation Type Group


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

    Execution group.

    Multiple Benchmark methods can be bound in the execution group to produce the asymmetric benchmark. Each execution group contains of one or more threads. Each thread within a particular execution group executes one of Group-annotated Benchmark methods. The number of threads executing a particular Benchmark defaults to a single thread, and can be overridden by GroupThreads.

    Multiple copies of an execution group may participate in the run, and the number of groups depends on the number of worker threads requested. JMH will take the requested number of worker threads, round it up to execution group size, and then distribute the threads among the (multiple) groups. Among other things, this guarantees fully-populated execution groups.

    For example, running Group with two Benchmark methods, each having GroupThreads(4), will run 8*N threads, where N is an integer.

    The group tag is used as the generated benchmark name. The result of each benchmark method in isolation is recorded as secondary result named by the original method name.

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String value
      Group tag.
    • Element Detail

      • value

        String value
        Group tag. Should be a valid Java identifier.
        Returns:
        group tag
        Default:
        "group"