@@ -77,6 +77,28 @@ let benchmarks = {
77
77
)
78
78
}
79
79
80
+ #if compiler(>=6.0)
81
+ if #available( macOS 15 . 0 , * ) {
82
+ Benchmark (
83
+ " TCPEchoAsyncChannel using task executor preference 1M times " ,
84
+ configuration: . init(
85
+ metrics: defaultMetrics,
86
+ scalingFactor: . one
87
+ // We are expecting a bit of allocation variance due to an allocation
88
+ // in the Concurrency runtime which happens when resuming a continuation.
89
+ // thresholds: [.mallocCountTotal: .init(absolute: [.p90: 2000])]
90
+ )
91
+ ) { benchmark in
92
+ try await withTaskExecutorPreference ( eventLoop. taskExecutor) {
93
+ try await runTCPEchoAsyncChannel (
94
+ numberOfWrites: 1_000_000 ,
95
+ eventLoop: eventLoop
96
+ )
97
+ }
98
+ }
99
+ }
100
+ #endif
101
+
80
102
Benchmark (
81
103
" MTELG.scheduleTask(in:_:) " ,
82
104
configuration: Benchmark . Configuration (
@@ -110,26 +132,4 @@ let benchmarks = {
110
132
let handle = try ! eventLoop. scheduleCallback ( in: . hours( 1 ) , handler: timer)
111
133
}
112
134
}
113
-
114
- #if compiler(>=6.0)
115
- if #available( macOS 15 . 0 , * ) {
116
- Benchmark (
117
- " TCPEchoAsyncChannel using task executor preference 1M times " ,
118
- configuration: . init(
119
- metrics: defaultMetrics,
120
- scalingFactor: . one
121
- // We are expecting a bit of allocation variance due to an allocation
122
- // in the Concurrency runtime which happens when resuming a continuation.
123
- // thresholds: [.mallocCountTotal: .init(absolute: [.p90: 2000])]
124
- )
125
- ) { benchmark in
126
- try await withTaskExecutorPreference ( eventLoop. taskExecutor) {
127
- try await runTCPEchoAsyncChannel (
128
- numberOfWrites: 1_000_000 ,
129
- eventLoop: eventLoop
130
- )
131
- }
132
- }
133
- }
134
- #endif
135
135
}
0 commit comments