timeUnits

    Override the automatic detection of timeunits for metrics related to time to a specific one (auto should work for most use cases)

    Benchmark.swift:391
    var timeUnits: BenchmarkTimeUnits

    See also

    • var maxDuration: Duration

      The maximum wall clock runtime for the benchmark, currenty defaults to .seconds(1) if not set

    • var maxIterations: Int

      The maximum number of iterations for the benchmark., currently defaults to 10K iterations if not set

    • var metrics: [BenchmarkMetric]

      Defines the metrics that should be measured for the benchmark

    • var skip: Bool

      Whether to skip this test (convenience for not having to comment out tests that have issues)

    • var thresholds: [BenchmarkMetric : BenchmarkThresholds]?

      Customized threshold tolerances for a given metric for the Benchmark used for checking for regressions/improvements/equality.

    • var scalingFactor: BenchmarkScalingFactor

      Specifies the number of logical subiterations being done, supporting scaling of metrics accordingly. E.g. .kilo will scale results with 1000. Any subiteration done in the benchmark should use for _ in benchmark.scaledIterations for the number of iterations.

    • var warmupIterations: Int

      Specifies a number of warmup iterations should be performed before the measurement to reduce outliers due to e.g. cache population

    Other members in extension

    Type members

    Instance members