package ego

  1. Overview
  2. Docs

Module Scheduler.BackoffSource

The module Backoff implements an exponential backoff scheduler. The scheduler works by tracking a maximum match limit, and (BEB) banning rules which exceed their limit.

Sourcetype t

Represents the persistent state of the scheduler - it really just tracks the match limit and ban_length parameters chosen by for this particular instantiation.

Sourcetype data

Represents the metadata about rules tracked by the scheduler.

Sourceval with_params : match_limit:int -> ban_length:int -> t

with_params ~match_limit ~ban_length creates a new backoff scheduler with the threshold for banning rules set to match_limit and the length for which rules are banned set to ban_length.

Sourceval default : unit -> t

default () returns a default instance of the backoff scheduler with the threshold for banning rules set to 1_000 and the initial ban_length set to 5.

Sourceval create_rule_metadata : t -> 'a -> data
Sourceval should_stop : t -> int -> data Iter.t -> bool
Sourceval guard_rule_usage : ('node, 'analysis, 'data, 'permission) egraph -> t -> data -> int -> (unit -> (Id.t * Id.t StringMap.t) Iter.t) -> (Id.t * Id.t StringMap.t) Iter.t