Releases: ordo-one/package-benchmark
Releases · ordo-one/package-benchmark
0.8.0
What's Changed
- feat: Add Configuration type to allow sharing of common configurations between benchmarks by @hassila in #59
Refactored configuration into a separate type and simplified the benchmark init signature accordingly.
This allows for sharing of configurations between benchmarks more easily, but is a source break.
It's trivial to change existing options for a benchmark though, e.g.
Benchmark("Memory transient allocations + 1 large leak",
metrics: BenchmarkMetric.memory,
throughputScalingFactor: .kilo) { benchmark in
performAllocations(count: benchmark.throughputScalingFactor.rawValue, size: 11 * 1024 * 1024)
performAllocations(count: 1, size: 32 * 1024 * 1024, shouldFree: false)
}
becomes
Benchmark("Memory transient allocations + 1 large leak",
configuration: .init(metrics: BenchmarkMetric.memory,
throughputScalingFactor: .kilo)) { benchmark in
performAllocations(count: benchmark.throughputScalingFactor.rawValue, size: 11 * 1024 * 1024)
performAllocations(count: 1, size: 32 * 1024 * 1024, shouldFree: false)
}
and
Benchmark.defaultDesiredDuration = .milliseconds(10)
Benchmark.defaultDesiredIterations = .giga(1)
becomes analogous
Benchmark.defaultConfiguration = .init(desiredDuration: .milliseconds(10),
desiredIterations: .giga(1))
or (both works)
Benchmark.defaultConfiguration.desiredDuration = .milliseconds(10)
Benchmark.defaultConfiguration.desiredIterations = .giga(1)
Gives nicer API and reusability of settings among targets.
Full Changelog: 0.7.0...0.8.0
0.7.0
What's Changed
We've renamed skip
to skip-target
and added filter
and skip
as options for actual benchmarks in this release.
It is now supported to use regex patterns for all target
/skip-target
/filter
/skip
options, e.g.:
swift package benchmark --filter ".*lock.*" --filter ".*[a-s]ile" --skip-target ".*slow"
Full Changelog: 0.6.1...0.7.0
0.6.1
0.6.0
0.5.4
What's Changed
- chore: Cleanup jemalloc helper by @hassila in #52
- feat: exportable benchmarks by @ORyanHampton in #49
- chore: Fix SwiftLint warnings by @hassila in #53
New Contributors
- @ORyanHampton made their first contribution in #49
Full Changelog: 0.5.3...0.5.4