Table of Contents

Method Create

Namespace
MailFathom.Application.AiProviders
Assembly
MailFathom.Application.dll

Create(string, int, IProviderPaceMarker, TimeProvider)

Builds a pacer for one workload from the rate a deployment declared.

public static ProviderRequestPacer Create(string workload, int maxRequestsPerMinute, IProviderPaceMarker marker, TimeProvider timeProvider)

Parameters

workload string

Which paced workload this is, as its marker is recorded.

maxRequestsPerMinute int

The requests one minute may carry, or zero to pace nothing.

marker IProviderPaceMarker

Hands out this workload's slots to every replica.

timeProvider TimeProvider

Measures the waits.

Returns

ProviderRequestPacer

The pacer.

Exceptions

ArgumentException

Thrown when workload names nothing.

ArgumentNullException

Thrown when an argument is null.

ArgumentOutOfRangeException

Thrown when the rate is negative.