init(_:configuration:closure:setup:teardown:)

    Definition of an async throwing Benchmark

    Benchmark+ConvenienceInitializers.swift:87
    @discardableResult convenience init?<SetupResult>(_ name: String, configuration: Benchmark.Configuration = Benchmark.defaultConfiguration, closure: @escaping (_ benchmark: Benchmark, SetupResult) async throws -> Void, setup: @escaping (() async throws -> SetupResult), teardown: BenchmarkTeardownHook? = nil)

    Parameters

    name

    The name used for display purposes of the benchmark (also used for matching when comparing to baselines)

    configuration

    Defines the settings that should be used for this benchmark

    closure

    The actual async throwing benchmark closure that will be measured, this one takes one additional parameter apart from the benchmark instance, which is the generic SetupResult type returned from the setup

    See also

    Other members in extension

    Types

    Typealiases

    Type members

    Show obsolete interfaces (1)

    Hide obsolete interfaces

    • static var checkAbsoluteThresholds: Bool

      Set to true if this benchmark results should be compared with an absolute threshold when --check-absolute is specified on the command line. An implementation can then choose to configure thresholds differently for such comparisons by e.g. reading them in from external storage.

    Instance members