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
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,28 @@ To run a simple example app showcasing the jextract (Java calling Swift) approac
111
111
This will also generate the necessary sources (by invoking jextract, extracting the `Sources/ExampleSwiftLibrary`)
112
112
and generating Java sources in `src/generated/java`.
113
113
114
+
## Benchmarks
115
+
116
+
You can run Swift [ordo-one/package-benchmark](https://github.com/ordo-one/package-benchmark) and OpenJDK [JMH](https://github.com/openjdk/jmh) benchmarks in this project.
117
+
118
+
Swift benchmarks are located under `Benchmarks/` and JMH benchmarks are currently part of the SwiftKit sample project: `Samples/SwiftKitSampleApp/src/jmh` because they depend on generated sources from the sample.
119
+
120
+
To run **Swift benchmarks** you can:
121
+
122
+
```bash
123
+
cd Benchmarks
124
+
swift package benchmark
125
+
```
126
+
127
+
In order to run JMH benchmarks you can:
128
+
129
+
```bash
130
+
cd Samples/SwiftKitSampleApp
131
+
gradle jmh
132
+
```
133
+
134
+
Please read documentation of both performance testing tools and understand that results must be interpreted and not just taken at face value. Benchmarking is tricky and environment sensitive task, so please be careful when constructing and reading benchmarks and their results. If in doubt, please reach out on the forums.
135
+
114
136
## User Guide
115
137
116
138
More details about the project and how it can be used are available in [USER_GUIDE.md](USER_GUIDE.md)
0 commit comments