public ThroughputBenchmark(IThroughputSettings settings) { _settings = settings; if (settings.MessageCount / settings.Clients * settings.Clients != settings.MessageCount) { throw new ArgumentException("The clients must be a factor of message count"); } _payload = _settings.PayloadSize > 0 ? new string('*', _settings.PayloadSize) : null; }
static void RunLatencyBenchmark(ProgramOptionSet optionSet) { var messageLatencyOptionSet = new ThroughputOptionSet(); messageLatencyOptionSet.Parse(_remaining); IThroughputSettings settings = messageLatencyOptionSet; var benchmark = new ThroughputBenchmark(settings); benchmark.Run(CancellationToken.None); }