Skip to content

Commit f70bf47

Browse files
Make BenchmarkRunner publicly accessible (#63)
* Make `BenchmarkRunner` public * Add docstrings.
1 parent 6d3a2e0 commit f70bf47

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Sources/Benchmark/BenchmarkRunner.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ public struct BenchmarkRunner {
1818
let customDefaults: [BenchmarkSetting]
1919
var progress: ProgressReporter
2020
var reporter: BenchmarkReporter
21-
var results: [BenchmarkResult] = []
2221

23-
init(
22+
/// Settings used and measurements taken.
23+
public var results: [BenchmarkResult] = []
24+
25+
public init(
2426
suites: [BenchmarkSuite],
2527
settings: [BenchmarkSetting],
2628
customDefaults: [BenchmarkSetting] = []
@@ -50,7 +52,8 @@ public struct BenchmarkRunner {
5052
}
5153
}
5254

53-
mutating func run() throws {
55+
/// Executes each suite in `self.suites` and reports results.
56+
public mutating func run() throws {
5457
for suite in suites {
5558
try run(suite: suite)
5659
}

0 commit comments

Comments
 (0)