protected override int RawThreadGroups => 4; //Environment.ProcessorCount / 2; protected override BenchmarkWorker[] BenchInstanceGenerator(ManualResetEvent syncPrimitive, IThreadGroupIndex threadGroupIndex) => new BenchmarkWorker[] { new ManualResetEventSetterWorker(syncPrimitive, this, $"{threadGroupIndex}", $"{threadGroupIndex}:S"), new ManualResetEventReSetterWorker(syncPrimitive, this, $"{threadGroupIndex}", $"{threadGroupIndex}:R") };
protected override ManualResetEvent SyncPrimitiveFactory(IThreadGroupIndex threadGroupIndex) => new ManualResetEvent(false);
public BenchmarkWorker[] CreateBenchInstance(IThreadGroupIndex threadGroupIndex) => BenchInstanceGenerator(CreateOrGetStoredSyncPrimitive(threadGroupIndex), threadGroupIndex) ;
protected virtual BenchmarkWorker[] BenchInstanceGenerator(TSyncPrimitive syncPrimitive, IThreadGroupIndex threadGroupIndex) => Array.Empty <BenchmarkWorker>() ;
protected virtual TSyncPrimitive SyncPrimitiveFactory(IThreadGroupIndex threadGroupIndex) => default(TSyncPrimitive);
protected override ConcurrentQueue <object> SyncPrimitiveFactory(IThreadGroupIndex threadGroupIndex) => new ConcurrentQueue <object>();
protected override BenchmarkWorker[] BenchInstanceGenerator(ConcurrentQueue <object> syncPrimitive, IThreadGroupIndex threadGroupIndex) => new BenchmarkWorker[] { new ConcurrentQueueWriterWorker(syncPrimitive, this, $"{threadGroupIndex}", $"{threadGroupIndex}:W"), new ConcurrentQueueReaderWorker(syncPrimitive, this, $"{threadGroupIndex}", $"{threadGroupIndex}:R") };