Class BenchmarkClassModel

  • All Implemented Interfaces:
    Serializable

    public abstract class BenchmarkClassModel
    extends Object
    implements Serializable
    A simplified model of a benchmark class, containing no reflective references to the class and only those things that the runner needs to know about the class in order to determine the scenarios to be run.
    See Also:
    Serialized Form
    • Constructor Detail

      • BenchmarkClassModel

        public BenchmarkClassModel()
    • Method Detail

      • create

        public static BenchmarkClassModel create​(Class<?> clazz)
        Creates a model of the given benchmark class and does some validation of it and the given user-provided values for the class' parameter fields.
      • validateUserParameters

        public static void validateUserParameters​(Class<?> clazz,
                                                  com.google.common.collect.SetMultimap<String,​String> userParameters)
        Validates the given user-provided parameters against the parameter fields on the benchmark class.
      • name

        public abstract String name()
        Returns the fully qualified name of the benchmark class.
      • simpleName

        public abstract String simpleName()
        Returns the simple name of the benchmark class.
      • methods

        public abstract com.google.common.collect.ImmutableSet<BenchmarkClassModel.MethodModel> methods()
        Returns the set of all methods declared on the class.
      • fillInDefaultParameterValues

        public final com.google.common.collect.ImmutableSetMultimap<String,​String> fillInDefaultParameterValues​(com.google.common.collect.ImmutableSetMultimap<String,​String> userParameters)
        Returns a multimap containing the full set of parameter values to use for the benchmark. For parameters on the benchmark that have values in the given user-supplied parameters, the user's specified values are used. For all other parameters, the default values specified in the annotation or implied by the type are used.
        Throws:
        IllegalArgumentException - if a parameter for the benchmark has neither user-specified values nor default values
      • vmOptions

        public abstract com.google.common.collect.ImmutableSet<String> vmOptions()
        Returns the set of VM options specified with the @VmOptions annotation.