mirror of
https://github.com/pointfreeco/swift-composable-architecture.git
synced 2025-12-20 09:11:33 +01:00
* Add `Store.init` that takes reducer builder * wip * wip * added some tests * wip * wip * wip --------- Co-authored-by: Brandon Williams <mbrandonw@hey.com>
19 lines
439 B
Swift
19 lines
439 B
Swift
import Benchmark
|
|
import Combine
|
|
import ComposableArchitecture
|
|
import Foundation
|
|
|
|
let viewStoreSuite = BenchmarkSuite(name: "ViewStore") {
|
|
let store = Store<Int, Void>(initialState: 0) {}
|
|
|
|
$0.benchmark("Create view store to send action") {
|
|
doNotOptimizeAway(ViewStore(store).send(()))
|
|
}
|
|
|
|
let viewStore = ViewStore(store)
|
|
|
|
$0.benchmark("Send action to pre-created view store") {
|
|
doNotOptimizeAway(viewStore.send(()))
|
|
}
|
|
}
|