1
- Swift Benchmark Suite
2
- =====================
1
+ # Swift Benchmark Suite
3
2
4
3
This directory contains the Swift Benchmark Suite.
5
4
6
- Running Swift Benchmarks
7
- ------------------------
5
+ ## Running Swift Benchmarks
8
6
9
7
To run Swift benchmarks, pass the ` --benchmark ` flag to ` build-script ` . The
10
8
current benchmark results will be compared to the previous run's results if
@@ -16,8 +14,7 @@ impacting changes, and run the benchmarks again. Upon benchmark completion, the
16
14
benchmark results for the development branch will be compared to the most
17
15
recent benchmark results for ` master ` .
18
16
19
- Building with build-script
20
- --------------------------
17
+ ## Building with build-script
21
18
22
19
By default, Swift benchmarks for OS X are compiled during the Swift build
23
20
process. To build Swift benchmarks for additional platforms, pass the following
@@ -33,8 +30,7 @@ drivers dynamically link Swift standard library dylibs from a path
33
30
relative to their run-time location (../lib/swift) so the standard
34
31
library should be distributed alongside them.
35
32
36
- Building Independently
37
- ----------------------
33
+ ## Building Independently
38
34
39
35
To build the Swift benchmarks using only an Xcode installation: install an
40
36
Xcode version with Swift support, install cmake 2.8.12, and ensure Xcode is
@@ -110,8 +106,7 @@ installed libraries instead, enable
110
106
This will reflect the performance of the Swift standard library
111
107
installed on the device, not the one included in the Swift root.
112
108
113
- Using the Benchmark Driver
114
- --------------------------
109
+ ## Using the Benchmark Driver
115
110
116
111
### Usage
117
112
@@ -154,17 +149,15 @@ You can use test numbers instead of test names like this:
154
149
Test numbers are not stable in the long run, adding and removing tests from the
155
150
benchmark suite will reorder them, but they are stable for a given build.
156
151
157
- Using the Harness Generator
158
- ---------------------------
152
+ ## Using the Harness Generator
159
153
160
154
` scripts/generate_harness/generate_harness.py ` runs ` gyb ` to automate generation
161
155
of some benchmarks.
162
156
163
157
** FIXME ** ` gyb ` should be invoked automatically during the
164
158
build so that manually invoking ` generate_harness.py ` is not required.
165
159
166
- Adding New Benchmarks
167
- ---------------------
160
+ ## Adding New Benchmarks
168
161
169
162
The harness generator supports both single and multiple file tests.
170
163
@@ -244,8 +237,8 @@ public func run_YourTestName(N: Int) {
244
237
The current set of tags are defined by the ` BenchmarkCategory ` enum in
245
238
` TestsUtils.swift ` .
246
239
247
- Testing the Benchmark Drivers
248
- -----------------------------
240
+ ## Testing the Benchmark Drivers
241
+
249
242
When working on tests, after the initial build
250
243
````
251
244
swift-source$ ./swift/utils/build-script -R -B
0 commit comments