You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,6 +140,25 @@ The `docs` directory contains documentation, including:
140
140
- How to configure keepalive in [`docs/keepalive.md`][docs-keepalive]
141
141
- Support for Apple Platforms and NIO Transport Services in
142
142
[`docs/apple-platforms.md`][docs-apple]
143
+
144
+
## Benchmarks
145
+
146
+
Benchmarks for `grpc-swift` are in a separate Swift Package in the `Performance/Benchmarks` subfolder of this repository.
147
+
They use the [`package-benchmark`](https://github.com/ordo-one/package-benchmark) plugin.
148
+
Benchmarks depends on the [`jemalloc`](https://jemalloc.net) memory allocation library, which is used by `package-benchmark` to capture memory allocation statistics.
149
+
An installation guide can be found in the [Getting Started article](https://swiftpackageindex.com/ordo-one/package-benchmark/documentation/benchmark/gettingstarted#Installing-Prerequisites-and-Platform-Support) of `package-benchmark`.
150
+
Afterwards you can run the benchmarks from CLI by going to the `Performance/Benchmarks` subfolder (e.g. `cd Performance/Benchmarks`) and invoking:
151
+
```
152
+
swift package benchmark
153
+
```
154
+
155
+
Profiling benchmarks or building the benchmarks in release mode in Xcode with `jemalloc` is currently not supported and requires disabling `jemalloc`.
156
+
Make sure Xcode is closed and then open it from the CLI with the `BENCHMARK_DISABLE_JEMALLOC=true` environment variable set e.g.:
157
+
```
158
+
BENCHMARK_DISABLE_JEMALLOC=true xed .
159
+
```
160
+
161
+
For more information please refer to `swift package benchmark --help` or the [documentation of `package-benchmark`](https://swiftpackageindex.com/ordo-one/package-benchmark/documentation/benchmark).
0 commit comments