The counted bounds of key, resolved once against the current contingent, or undefined when disabled or
unbounded. Arming counterpart of checkGas for the dataflow fold, see GasFeatureKey.Dataflow.
Returns the resource-pressure level for key (config.gas.features[key]).
Returns GasLevel.Normal with zero overhead when the feature factor is 0 or absent
and no gas plugins are registered (plugins are always consulted and may escalate any key).
Measured from the start of the enclosing contingent, against the thresholds configured for key
(see GasThresholdSpec), not one allowance shared by everything the analyzer does.
A new analysis makes the spent contingent irrelevant.
Restart the contingent, so what follows is measured from now. Supported API: call it between phases
that should each get the full allowance (analyzer.context().gas.reset()).
flowR calls it itself whenever a new analysis begins, so a caller only has to split its own phases. Operations in flight keep their contingent, as restarting a running traversal's clock would defeat the guard bounding it.
A view with a fresh contingent, measured from this call, for one operation to run against.
The enclosing bounds still apply, overrides winning over them. Derives a new object rather than
mutating this one, so it is safe for nested and concurrent work.
Optionaloverrides: GasOverridesRuns fn against a contingent of its own: the configured bounds only, none of the overrides of the
operation asking, and a fresh start time. Reports whether any gas check during fn came back above normal,
so a result meant to be shared (see FlowrAnalyzerCache#derive) is only kept when it is complete.
Use it for work that outlives the operation asking, and FlowrAnalyzerGasContext#withGas for the work of the asking
operation itself, since this one ignores the overrides in effect (so it does not inherit a tight bound of the caller).
degraded is also set if a check inside a nested scope reported more than normal.
Run fn against a fresh contingent bounded by overrides, ending when it settles if fn is async.
Every check while fn runs sees it, however deep, which is how the bounds reach sites that only ever
get a context handed to them.
Being ambient, concurrent operations on one analyzer see whichever started last, so prefer scope wherever the context can be threaded through.
Checks heap and elapsed-time pressure for named analysis features. See ReadOnlyFlowrAnalyzerGasContext.