Cerbero.Severity (cerbero v0.1.0)

Copy Markdown View Source

severity(lock, cost, scale, traffic, config, multiplier).

Lock-queue damage tracks traffic, not table size; rewrite/scan damage tracks rows and bytes. The multiplier is staleness headroom (thresholds shrink as the snapshot ages). Unknown scale is unbounded, never small. An ACCESS EXCLUSIVE operation is never silent: the floor is :info.

Summary

Types

scale()

@type scale() :: {:rows, non_neg_integer(), non_neg_integer()} | :zero | :unknown

traffic()

@type traffic() :: :hot | :cold | :unknown

Functions

assess(lock, cost, scale, traffic, config, multiplier \\ 1.0)

@spec assess(atom(), atom(), scale(), traffic(), Cerbero.Config.t(), float()) ::
  :error | :warning | :info | :none