public IterationResult(IIterationResult iteration, IThreadPoolStats threadPoolContext) { ThreadId = iteration.ThreadId; GlobalIterationId = iteration.GlobalIterationId; ThreadIterationId = iteration.ThreadIterationId; UserData = iteration.UserData; IterationStarted = iteration.IterationStarted; IterationFinished = iteration.IterationFinished; CreatedThreads = threadPoolContext.InitializedThreadCount; IdleThreads = threadPoolContext.IdleThreadCount; Checkpoints = iteration.CopyCheckpoints(); }
public void HeartBeat(ITestState state) { if (_batchState == BatchState.Waiting) { IThreadPoolStats pool = state.ThreadPool; if (pool.CreatedThreadCount == pool.IdleThreadCount && pool.CreatedThreadCount >= _batchSize) { _executedInBatch = 0; _executeAt = state.Timer.Value.Add(ExecuteDelay); _batchState = BatchState.Executing; } } else if (_executedInBatch >= _batchSize) { _batchState = BatchState.Waiting; } }
public TestState(ITimer timer, IGlobalCounters counters, IThreadPoolStats threadPool) { if (timer == null) { throw new ArgumentNullException(nameof(timer)); } if (counters == null) { throw new ArgumentNullException(nameof(counters)); } if (threadPool == null) { throw new ArgumentNullException(nameof(threadPool)); } Timer = timer; Counters = counters; ThreadPool = threadPool; }
private IDataCollectorFactory CreateDataCollectorFactory(IPipeFactory <IResult> pipeFactory, IThreadPoolStats poolStats) { IDataCollectorFactory result; if (_settings.Aggregators.IsNullOrEmpty()) { result = new NullDataCollectorFactory(); } else { result = new PipeDataCollectorFactory(pipeFactory, poolStats); } return(result); }
public PipeDataCollectorFactory(IPipeFactory <IResult> pipeFactory, IThreadPoolStats counter) { _pipeFactory = pipeFactory ?? throw new ArgumentNullException(nameof(pipeFactory)); _counter = counter ?? throw new ArgumentNullException(nameof(counter)); }
public WorkerThreadStats(IThreadPoolStats reference) { _createdThreadCount = reference.CreatedThreadCount; _initializedTheadCount = reference.InitializedThreadCount; _idleThreadCount = reference.IdleThreadCount; }
public void Setup(ITestState state) { _pool = state.ThreadPool; }
public PipeDataCollector(IProducer <IResult> producer, IIterationResult context, IThreadPoolStats poolStats) { _producer = producer ?? throw new ArgumentNullException(nameof(producer)); _context = context ?? throw new ArgumentNullException(nameof(context)); _poolStats = poolStats ?? throw new ArgumentNullException(nameof(poolStats)); }