@@ -544,18 +544,21 @@ public override void Cleanup()
544544}
545545
546546[ AggressivelyOptimizeMethods ]
547- public class BenchmarkActionConfiguredCancelableAsyncEnumerable < T > : BenchmarkActionBase
547+ public class BenchmarkActionAsyncEnumerable < T > : BenchmarkActionBase
548+ #if NET9_0_OR_GREATER
549+ where T : allows ref struct
550+ #endif
548551{
549- private readonly Func < ConfiguredCancelableAsyncEnumerable < T > > callback ;
552+ private readonly Func < IAsyncEnumerable < T > > callback ;
550553 private readonly int unrollFactor ;
551554 private WorkloadValueTaskSource workloadValueTaskSource = null ! ;
552555 private IClock ? clock ;
553556 private long invokeCount ;
554557
555558 [ SetsRequiredMembers ]
556- public BenchmarkActionConfiguredCancelableAsyncEnumerable ( object ? instance , MethodInfo method , int unrollFactor )
559+ public BenchmarkActionAsyncEnumerable ( object ? instance , MethodInfo method , int unrollFactor )
557560 {
558- callback = CreateWorkload < Func < ConfiguredCancelableAsyncEnumerable < T > > > ( instance , method ) ;
561+ callback = CreateWorkload < Func < IAsyncEnumerable < T > > > ( instance , method ) ;
559562 this . unrollFactor = unrollFactor ;
560563 InvokeSingle = InvokeOnce ;
561564 InvokeUnroll = WorkloadActionUnroll ;
@@ -623,18 +626,21 @@ public override void Cleanup()
623626}
624627
625628[ AggressivelyOptimizeMethods ]
626- public class BenchmarkActionAsyncEnumerable < T > : BenchmarkActionBase
629+ public class BenchmarkActionConfiguredCancelableAsyncEnumerable < T > : BenchmarkActionBase
630+ #if NET10_0_OR_GREATER
631+ where T : allows ref struct
632+ #endif
627633{
628- private readonly Func < IAsyncEnumerable < T > > callback ;
634+ private readonly Func < ConfiguredCancelableAsyncEnumerable < T > > callback ;
629635 private readonly int unrollFactor ;
630636 private WorkloadValueTaskSource workloadValueTaskSource = null ! ;
631637 private IClock ? clock ;
632638 private long invokeCount ;
633639
634640 [ SetsRequiredMembers ]
635- public BenchmarkActionAsyncEnumerable ( object ? instance , MethodInfo method , int unrollFactor )
641+ public BenchmarkActionConfiguredCancelableAsyncEnumerable ( object ? instance , MethodInfo method , int unrollFactor )
636642 {
637- callback = CreateWorkload < Func < IAsyncEnumerable < T > > > ( instance , method ) ;
643+ callback = CreateWorkload < Func < ConfiguredCancelableAsyncEnumerable < T > > > ( instance , method ) ;
638644 this . unrollFactor = unrollFactor ;
639645 InvokeSingle = InvokeOnce ;
640646 InvokeUnroll = WorkloadActionUnroll ;
0 commit comments