UNPKG

@eagleoutice/flowr-dev

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

20 lines (19 loc) 977 B
import { FlowrAnalyzerPlugin, PluginType } from '../flowr-analyzer-plugin'; import type { GasLevel } from '../../../gas'; /** * Base class for gas plugins, queried on-demand by {@link FlowrAnalyzerGasContext.checkGas}. * * Override {@link process} to provide a custom resource-pressure assessment for a feature key. * Return `undefined` to defer to the built-in memory and time checks. * Multiple Gas plugins are combined by taking the maximum ({@link GasLevel}) returned by any plugin * or by the built-in checks. * * A gas plugin is the right place to add domain-specific checks (e.g., CPU, I/O, quota limits) * or to override default behavior for testing by returning a hardcoded level. * @see {@link PluginType.Gas} * @see {@link FlowrAnalyzerGasContext} */ export declare abstract class FlowrAnalyzerGasPlugin extends FlowrAnalyzerPlugin<string, GasLevel | undefined> { readonly type = PluginType.Gas; static defaultPlugin(): FlowrAnalyzerGasPlugin; }