protected override long RunDisruptorPass()
        {
            CountdownEvent latch         = new CountdownEvent(1);
            long           expectedCount = poller.GetSequence().Value + ITERATIONS;

            pollRunnable.reset(latch, expectedCount);
            Task.Factory.StartNew(() => pollRunnable.Run());
            Stopwatch watch = Stopwatch.StartNew();

            RingBuffer <ValueEvent> rb = ringBuffer;

            for (long i = 0; i < ITERATIONS; i++)
            {
                long next = rb.Next();
                rb[next].Value = i;
                rb.Publish(next);
            }

            latch.Wait();
            long opsPerSecond = (ITERATIONS * 1000L) / (watch.ElapsedMilliseconds);

            waitForEventProcessorSequence(expectedCount);
            pollRunnable.Halt();

            PerfTestUtil.failIfNot(expectedResult, pollRunnable.getValue());

            return(opsPerSecond);
        }
 public OneToOneSequencedPollerThroughputTest()
     : base(Test_Disruptor, ITERATIONS, 7)
 {
     ThreadPool.SetMaxThreads(1, 1);
     poller       = ringBuffer.NewPoller();
     pollRunnable = new PollRunnable(poller);
     ringBuffer.AddGatingSequences(poller.GetSequence());
 }
 public OneToOneSequencedPollerThroughputTest()
     : base(Test_Disruptor, ITERATIONS,7)
 {
     ThreadPool.SetMaxThreads (1,1);
     poller = ringBuffer.NewPoller();
     pollRunnable = new PollRunnable(poller);
     ringBuffer.AddGatingSequences(poller.GetSequence());  
 }