Skip to content

Commit b7acc6d

Browse files
authored
Merge pull request #26522 from atrick/fix-bench-docs
2 parents 180a136 + 878814d commit b7acc6d

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

benchmark/README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,17 @@ The following build options are available:
7070

7171
The following build targets are available:
7272

73-
1. `swift-benchmark-macosx-x86_64`
74-
2. `swift-benchmark-iphoneos-arm64`
75-
3. `swift-benchmark-iphoneos-armv7`
76-
4. `swift-benchmark-appletvos-arm64`
77-
5. `swift-benchmark-watchos-armv7k`
73+
* `swift-benchmark-macosx-x86_64`
74+
* `swift-benchmark-iphoneos-arm64`
75+
* `swift-benchmark-iphoneos-armv7`
76+
* `swift-benchmark-appletvos-arm64`
77+
* `swift-benchmark-watchos-armv7k`
7878

7979
Build steps (with example options):
8080

81-
1. `$ cd benchmark`
82-
2. `$ mkdir build`
83-
3. `$ cd build`
84-
4. `$ cmake ../benchmark -G Ninja -DSWIFT_EXEC=[path to built swiftc]`
85-
5. `$ ninja swift-benchmark-macosx-x86_64`
81+
1. `$ mkdir build; cd build`
82+
2. `$ cmake [path to swift src]/benchmark -G Ninja -DSWIFT_EXEC=[path to built swiftc]`
83+
3. `$ ninja swift-benchmark-macosx-x86_64`
8684

8785
Benchmark binaries are placed in `bin`.
8886

@@ -96,12 +94,12 @@ relative to the benchmark binary at the time it was executed
9694
For example, to benchmark against a locally built `swiftc`, including
9795
any standard library changes in that build, you might configure using:
9896

99-
cmake ../benchmark -G Ninja -DSWIFT_EXEC=<src>/swift/build/swift-macosx-x86_64/bin/swiftc
97+
cmake <src>/benchmark -G Ninja -DSWIFT_EXEC=<build>/swift-macosx-x86_64/bin/swiftc
10098
ninja swift-benchmark-iphoneos-arm64
10199

102100
To build against the installed Xcode, simply omit SWIFT_EXEC:
103101

104-
cmake ../benchmark -G Ninja
102+
cmake <src>/benchmark -G Ninja
105103
ninja swift-benchmark-iphoneos-arm64
106104

107105
In both examples above, to run the benchmarks on a device, the dynamic
@@ -110,7 +108,7 @@ relative to `swiftc`. To benchmark against the target machine's
110108
installed libraries instead, enable
111109
`SWIFT_BENCHMARK_USE_OS_LIBRARIES`.
112110

113-
cmake ../benchmark -G Ninja -DSWIFT_BENCHMARK_USE_OS_LIBRARIES=ON
111+
cmake <src>/benchmark -G Ninja -DSWIFT_BENCHMARK_USE_OS_LIBRARIES=ON
114112
ninja swift-benchmark-iphoneos-arm64
115113

116114
This will reflect the performance of the Swift standard library

0 commit comments

Comments
 (0)