pub struct GraphBudget<'a> {
pub max_calls: u32,
pub max_bytes_fetched: u64,
pub max_nodes: u32,
pub deadline: Box<dyn Fn() -> SleepFuture + 'a>,
pub half_deadline: Option<Box<dyn Fn() -> SleepFuture + 'a>>,
}Expand description
The per-graph budget of a GASPSync (bsv-low #555,
Engine::set_graph_budget). Setting one turns deferral ON for that sync.
Fields§
§max_calls: u32Calls one graph may make in one pass (DEFAULT_GRAPH_BUDGET_CALLS).
max_bytes_fetched: u64Bytes one graph may be served in one pass
(DEFAULT_GRAPH_BUDGET_BYTES, bsv-low #586). Reached, the graph is
DEFERRED as at max_calls (reason bytes): never dropped, never
refused.
max_nodes: u32Nodes one graph may append in one pass
(DEFAULT_GRAPH_BUDGET_NODES, bsv-low #586). Reached, the graph is
deferred (reason nodes).
deadline: Box<dyn Fn() -> SleepFuture + 'a>A fresh deadline for ONE graph’s pass (DEFAULT_GRAPH_BUDGET_MS).
half_deadline: Option<Box<dyn Fn() -> SleepFuture + 'a>>A fresh deadline for HALF of it (the delta-2 fold’s D2-L1): a FRESH
walk that faults once this fell due, or after half its calls, has
paid for a record and keeps one. None: the calls alone decide.