Skip to content

1.4.0

Compare
Choose a tag to compare
@github-actions github-actions released this 28 Mar 16:24
· 100 commits to main since this release
231f8b8

1.4.0 (2023-03-28)

New command for faster creation of benchmarks introduced:

swift package --allow-writing-to-package-directory benchmark init MyNewBenchmark

This will:

  • Create the path Benchmarks/MyNewBenchmark
  • Add the file Benchmarks/MyNewBenchmark/MyNewBenchmark.swift with the required boilerplate
  • Add the executable target for the benchmark to the end of your Package.swift file

You still need to add the dependency to the benchmark package first as previously.

Sample:

swift package --allow-writing-to-package-directory benchmark init MyNewBenchmark
swift package benchmark --target MyNewBenchmark
...
Building for debugging...
Build complete! (0.33s)
Building benchmark targets in release mode for benchmark run...
Building MyBenchmarkTarget
Build complete!

==================
Running Benchmarks
==================

100% [------------------------------------------------------------] ETA: 00:00:00 | MyBenchmarkTarget:SomeBenchmark

====================================================================================================
Baseline 'Current run'
====================================================================================================

Host 'max.local' with 10 'arm64' processors with 64 GB memory, running:
Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000

=================
MyBenchmarkTarget
=================

SomeBenchmark
╒════════════════════════════╤═════════╤═════════╤═════════╤═════════╤═════════╤═════════╤═════════╤═════════╕
│ Metric                     │      p0 │     p25 │     p50 │     p75 │     p90 │     p99 │    p100 │ Samples │
╞════════════════════════════╪═════════╪═════════╪═════════╪═════════╪═════════╪═════════╪═════════╪═════════╡
│ Malloc (total)             │       0 │       0 │       0 │       0 │       0 │       0 │       0 │   10000 │
├────────────────────────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Memory (resident peak) (K) │    7618 │    7639 │    7655 │    7655 │    7671 │    7671 │    7671 │   10000 │
├────────────────────────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Throughput (# / s) (M)     │      24 │      23 │      12 │      12 │      11 │       8 │       0 │    9999 │
├────────────────────────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Time (total CPU) (ns)      │     500 │     583 │     584 │     625 │     750 │    1208 │   12791 │   10000 │
├────────────────────────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Time (wall clock) (ns)     │      41 │      42 │      83 │      83 │      84 │     125 │    5875 │    9999 │
╘════════════════════════════╧═════════╧═════════╧═════════╧═════════╧═════════╧═════════╧═════════╧═════════╛

Features

  • minor: Adding support for benchmark init command (#135) (231f8b8), closes #129

Bug Fixes