Runic.Runner.Scheduler.Adaptive.Capability (Runic v0.1.0-alpha.7)

Copy Markdown View Source

A registered dispatch capability that the Adaptive scheduler can assign to nodes.

Each capability has a name, description, priority (lower = evaluated first), and a classifier function that receives a %NodeProfile{} and returns true if the node matches.

Example

%Capability{
  name: :cpu_bound,
  description: "CPU-intensive nodes that benefit from dedicated processes",
  priority: 5,
  classifier: fn profile -> profile.avg_duration_ms > 100.0 end
}

Summary

Types

t()

@type t() :: %Runic.Runner.Scheduler.Adaptive.Capability{
  classifier: (Runic.Runner.Scheduler.Adaptive.NodeProfile.t() -> boolean()),
  description: String.t(),
  name: atom(),
  priority: non_neg_integer()
}