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: GasOverridesRun 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.