@@ -164,37 +164,87 @@ extension BenchmarkHelper on Stopwatch {
164164 return switch (scoreInMicroseconds) {
165165 < t1n1 => SampleSize (length: s1n1, innerIterations: i1n1), // 1 us
166166 > t1n1 && <= t1e0 => SampleSize (
167- length:
168- interpolateExp (scoreInMicroseconds, t1n1, s1n1, t1e0, s1e0).ceil (),
169- innerIterations:
170- interpolateExp (scoreInMicroseconds, t1n1, i1n1, t1e0, i1e0).ceil (),
167+ length: interpolateExp (
168+ scoreInMicroseconds,
169+ t1n1,
170+ s1n1,
171+ t1e0,
172+ s1e0,
173+ ).ceil (),
174+ innerIterations: interpolateExp (
175+ scoreInMicroseconds,
176+ t1n1,
177+ i1n1,
178+ t1e0,
179+ i1e0,
180+ ).ceil (),
171181 ), // 1 us
172182 > t1e0 && <= t1e1 => SampleSize (
173- length:
174- interpolateExp (scoreInMicroseconds, t1e0, s1e0, t1e1, s1e1).ceil (),
175- innerIterations:
176- interpolateExp (scoreInMicroseconds, t1e0, i1e0, t1e1, i1e1).ceil (),
183+ length: interpolateExp (
184+ scoreInMicroseconds,
185+ t1e0,
186+ s1e0,
187+ t1e1,
188+ s1e1,
189+ ).ceil (),
190+ innerIterations: interpolateExp (
191+ scoreInMicroseconds,
192+ t1e0,
193+ i1e0,
194+ t1e1,
195+ i1e1,
196+ ).ceil (),
177197 ), // 10 us
178198 > t1e1 && <= t1e2 => SampleSize (
179- length:
180- interpolateExp (scoreInMicroseconds, t1e1, s1e1, t1e2, s1e2).ceil (),
181- innerIterations:
182- interpolateExp (scoreInMicroseconds, t1e1, i1e1, t1e2, i1e2).ceil (),
199+ length: interpolateExp (
200+ scoreInMicroseconds,
201+ t1e1,
202+ s1e1,
203+ t1e2,
204+ s1e2,
205+ ).ceil (),
206+ innerIterations: interpolateExp (
207+ scoreInMicroseconds,
208+ t1e1,
209+ i1e1,
210+ t1e2,
211+ i1e2,
212+ ).ceil (),
183213 ), // 100 us
184214 > t1e2 && <= t1e3 => SampleSize (
185- length:
186- interpolateExp (scoreInMicroseconds, t1e2, s1e2, t1e3, s1e3).ceil (),
187- innerIterations:
188- interpolateExp (scoreInMicroseconds, t1e2, i1e2, t1e3, i1e3).ceil (),
215+ length: interpolateExp (
216+ scoreInMicroseconds,
217+ t1e2,
218+ s1e2,
219+ t1e3,
220+ s1e3,
221+ ).ceil (),
222+ innerIterations: interpolateExp (
223+ scoreInMicroseconds,
224+ t1e2,
225+ i1e2,
226+ t1e3,
227+ i1e3,
228+ ).ceil (),
189229 ), // 1ms
190230 > t1e3 && <= t1e4 => SampleSize (
191- length:
192- interpolateExp (scoreInMicroseconds, t1e3, s1e3, t1e4, s1e4).ceil (),
231+ length: interpolateExp (
232+ scoreInMicroseconds,
233+ t1e3,
234+ s1e3,
235+ t1e4,
236+ s1e4,
237+ ).ceil (),
193238 innerIterations: i1e4,
194239 ), // 10 ms
195240 > t1e4 && <= t1e5 => SampleSize (
196- length:
197- interpolateExp (scoreInMicroseconds, t1e4, s1e4, t1e5, s1e5).ceil (),
241+ length: interpolateExp (
242+ scoreInMicroseconds,
243+ t1e4,
244+ s1e4,
245+ t1e5,
246+ s1e5,
247+ ).ceil (),
198248 innerIterations: i1e5,
199249 ), // 100 ms
200250 _ => SampleSize (length: s1e5, innerIterations: i1e5),
0 commit comments