Enumerationpackage-benchmark 1.27.2Benchmark
Polarity
A constant that states whether larger or smaller measurements, relative to a set baseline, indicate better performance.
BenchmarkMetric.swift:105BenchmarkMetric_Polarity.mdenum Polarity
Types of Polarity
case prefersLarger
A performance measurement where a larger value, relative to a set baseline, indicates better performance.
case prefersSmaller
A performance measurement where a smaller value, relative to a set baseline, indicates better performance.
Decoding Polarity
See also
case custom(String, polarity: Polarity, useScalingFactor: Bool)
Custom metric
var polarity: BenchmarkMetric.Polarity
Indicates whether larger or smaller measurements, relative to a set baseline, indicate better performance.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (19) members.
Type members
init?(argument: String
) init(from: any Decoder
) throws static var all: [BenchmarkMetric]
A collection of all benchmarks supported by this library.
static var arc: [BenchmarkMetric]
A collection of ARC metrics
static var `default`: [BenchmarkMetric]
The default collection of metrics used for a benchmark.
static var disk: [BenchmarkMetric]
A collection of disk benchmarks.
static var extended: [BenchmarkMetric]
A collection of extended system benchmarks.
static var maxIndex: Int
static var memory: [BenchmarkMetric]
A collection of memory benchmarks.
static var microbenchmark: [BenchmarkMetric]
A small collection of metrics used for microbenchmarks only interested in CPU
static var system: [BenchmarkMetric]
A collection of system benchmarks.
static func == (lhs: BenchmarkMetric, rhs: BenchmarkMetric
) -> Bool
Instance members
var countable: Bool
var description: String
var index: Int
var rawDescription: String
var useScalingFactor: Bool
True if this metric should be scaled to the scalingFactor if looking at scaled output.
func hash(into: inout Hasher
) func metricFor(index: Int
) -> BenchmarkMetric
Citizens in Benchmark
Conformances
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.