InlineOverheadScenario
Statistics scenarios · Implementation: mlsysim/engine/scenario_definitions/statistics.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
A safeguard added inline to a request path of base_latency, costing overhead_low to overhead_high (fractions of the base) per request.
Under the proportional assumption, holding throughput needs capacity in the ratio of the new latency to the old.
Notes
Equation: Multiply baseline latency by each overhead fraction, then add it back to form the latency stretch.
Assumptions: Inline overhead scales baseline latency by the supplied low/high fractions.
Excludes: Queueing, overlap, batching, and an independent provisioning calculation.
References
Derivation: Multiply baseline latency by each overhead fraction, then add it back to form the latency stretch. Individual property contracts identify the exact accounting expression or reusable calculation. Registry entries supply the scenario inputs; this class does not turn them into measured outcomes.
Examples
Evaluate a named scenario using its declared inputs.
>>> from mlsysim import Scenarios
>>> scenario = Scenarios.InlineShapRetrofit
>>> round(float(scenario.added_low.magnitude), 4)
50.0Attributes
| Name | Description |
|---|---|
| added_high | Milliseconds of added inline work at the upper assumed overhead fraction. |
| added_low | Milliseconds of added inline work at the lower assumed overhead fraction. |
| base_latency | |
| capacity_high | Dimensionless upper latency stretch, interpreted as capacity demand only under unchanged |
| capacity_low | Dimensionless lower latency stretch, interpreted as capacity demand only under unchanged |
| latency_high | Total milliseconds after adding the upper inline overhead. |
| latency_low | Total milliseconds after adding the lower inline overhead. |
| overhead_high | |
| overhead_low | |
| request_rate |
base_latency
Type: Quantity.
Declared default: required.
overhead_low
Type: float.
Declared default: required.
overhead_high
Type: float.
Declared default: required.
request_rate
Type: Optional[Quantity].
Declared default: None.
added_low
engine.scenario_types.InlineOverheadScenario.added_low
Milliseconds of added inline work at the lower assumed overhead fraction.
Equation: (base_latency * overhead_low).to('ms').
added_high
engine.scenario_types.InlineOverheadScenario.added_high
Milliseconds of added inline work at the upper assumed overhead fraction.
Equation: (base_latency * overhead_high).to('ms').
latency_low
engine.scenario_types.InlineOverheadScenario.latency_low
Total milliseconds after adding the lower inline overhead.
Equation: (base_latency + added_low).to('ms').
latency_high
engine.scenario_types.InlineOverheadScenario.latency_high
Total milliseconds after adding the upper inline overhead.
Equation: (base_latency + added_high).to('ms').
capacity_low
engine.scenario_types.InlineOverheadScenario.capacity_low
Dimensionless lower latency stretch, interpreted as capacity demand only under unchanged throughput assumptions.
Equation: (latency_low / base_latency).to('').magnitude.
capacity_high
engine.scenario_types.InlineOverheadScenario.capacity_high
Dimensionless upper latency stretch, interpreted as capacity demand only under unchanged throughput assumptions.
Equation: (latency_high / base_latency).to('').magnitude.