pub fn subdivide_grace_budget(
grace_remaining: Duration,
in_flight_count: usize,
original_budget: Option<Budget>,
) -> BudgetExpand description
Calculate subdivided budget for a request during grace period.
During graceful shutdown, in-flight requests get a proportional share of the remaining grace period.
§Arguments
grace_remaining- Time remaining in the grace periodin_flight_count- Number of in-flight requestsoriginal_budget- The request’s original budget (if any)
§Returns
A budget that is the minimum of:
- The remaining grace period divided by in-flight count
- The original budget (if provided)