We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed34c76 commit 414e88dCopy full SHA for 414e88d
Sources/swift-composable-architecture-benchmark/ViewStore.swift
@@ -0,0 +1,21 @@
1
+import Benchmark
2
+import Combine
3
+import ComposableArchitecture
4
+import Foundation
5
+
6
+let viewStoreSuite = BenchmarkSuite(name: "ViewStore") {
7
+ let store = Store(
8
+ initialState: 0,
9
+ reducer: EmptyReducer<Int, Void>()
10
+ )
11
12
+ $0.benchmark("Create view store to send action") {
13
+ doNotOptimizeAway(ViewStore(store).send(()))
14
+ }
15
16
+ let viewStore = ViewStore(store)
17
18
+ $0.benchmark("Send action to pre-created view store") {
19
+ doNotOptimizeAway(viewStore.send(()))
20
21
+}
Sources/swift-composable-architecture-benchmark/main.swift
@@ -6,4 +6,5 @@ Benchmark.main([
dependenciesSuite,
effectSuite,
storeScopeSuite,
+ viewStoreSuite,
])
0 commit comments