Skip to content

Commit c52f493

Browse files
authored
Add benchmark testing (#143)
* Add benchmark test project * Implement basic benchmark testing * Run on CI * Gardening * Add more stressed benchmark * Add Benchmarks dir to the formatter target
1 parent 6b71b5e commit c52f493

File tree

13 files changed

+811
-4
lines changed

13 files changed

+811
-4
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ jobs:
3939
- name: Test example iOS
4040
run: scripts/test.sh example-ios ios
4141

42+
benchmark:
43+
name: Benchmark
44+
runs-on: macos-13
45+
steps:
46+
- uses: actions/checkout@v4
47+
- name: Run benchmark test
48+
run: scripts/test.sh benchmark ios
49+
4250
validation:
4351
name: Validation
4452
runs-on: macos-13

Benchmarks/App/Info-iOS.plist

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
7+
<key>CFBundleDisplayName</key>
8+
<string>Benchmarks</string>
9+
<key>CFBundleExecutable</key>
10+
<string>$(EXECUTABLE_NAME)</string>
11+
<key>CFBundleIdentifier</key>
12+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13+
<key>CFBundleInfoDictionaryVersion</key>
14+
<string>6.0</string>
15+
<key>CFBundleName</key>
16+
<string>$(PRODUCT_NAME)</string>
17+
<key>CFBundlePackageType</key>
18+
<string>APPL</string>
19+
<key>CFBundleShortVersionString</key>
20+
<string>1.0</string>
21+
<key>CFBundleVersion</key>
22+
<string>1</string>
23+
<key>UILaunchScreen</key>
24+
<string></string>
25+
<key>UIRequiresFullScreen</key>
26+
<true/>
27+
<key>UISupportedInterfaceOrientations</key>
28+
<array>
29+
<string>UIInterfaceOrientationPortrait</string>
30+
</array>
31+
</dict>
32+
</plist>

Benchmarks/App/iOS.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import SwiftUI
2+
3+
@main
4+
struct TestHostApp {
5+
static func main() {
6+
_TestApp().run()
7+
}
8+
}

0 commit comments

Comments
 (0)