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
workloadstringWhich paced workload this is, as its marker is recorded.
maxRequestsPerMinuteintThe requests one minute may carry, or zero to pace nothing.
markerIProviderPaceMarkerHands out this workload's slots to every replica.
timeProviderTimeProviderMeasures the waits.
Returns
- ProviderRequestPacer
The pacer.
Exceptions
- ArgumentException
Thrown when
workloadnames nothing.- ArgumentNullException
Thrown when an argument is null.
- ArgumentOutOfRangeException
Thrown when the rate is negative.