1.28.0 (2025-02-11)
Features
Swift 6 benchmark targets should now be possible with:
let benchmarks: @Sendable () -> Void = {
...
}
Make it possible to specify output units for the text output for a given metric by specifying it in the configuration.
E.g.
Benchmark.defaultConfiguration.units = [.peakMemoryResident: .mega, .peakMemoryVirtual: .giga]
Also add the ability to override the time units from the command line using --time-units
.
E.g.
swift package benchmark --time-units microseconds
This update also displays overflowing numeric values in scientific notation in the text output:
╒═══════════════════════════════════════════════════════════════════════════╤═══════════╤═══════════╤═══════════╤═══════════╤═══════════╤═══════════╤═══════════╤═══════════╕
│ Test │ p0 │ p25 │ p50 │ p75 │ p90 │ p99 │ p100 │ Samples │
╞═══════════════════════════════════════════════════════════════════════════╪═══════════╪═══════════╪═══════════╪═══════════╪═══════════╪═══════════╪═══════════╪═══════════╡
│ Samples:All metrics, full concurrency, async (ns) * │ 8.08e+07 │ 8.34e+07 │ 8.38e+07 │ 8.40e+07 │ 8.41e+07 │ 8.46e+07 │ 8.49e+07 │ 183 │
├───────────────────────────────────────────────────────────────────────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┤
│ Samples:Counter, custom metric thresholds (ns) * │ 2375 │ 2417 │ 2417 │ 2459 │ 2501 │ 2709 │ 4334 │ 4753 │
├───────────────────────────────────────────────────────────────────────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┤
│ Samples:Extended + custom metrics (ns) * │ 1875 │ 2000 │ 2000 │ 2041 │ 2167 │ 2667 │ 8750 │ 707 │
├───────────────────────────────────────────────────────────────────────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┤
│ Samples:Extended metrics (ns) * │ 1750 │ 1875 │ 1875 │ 1917 │ 1958 │ 2209 │ 3250 │ 705 │
╘═══════════════════════════════════════════════════════════════════════════╧═══════════╧═══════════╧═══════════╧═══════════╧═══════════╧═══════════╧═══════════╧═══════════╛