hydra-node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Logging.Monitoring.Accounting

Description

Bounded, process-local timing state. Replayed events seed identities, never invent start times or increment process counters.

Synopsis

Documentation

data SnapshotKey head Source #

Constructors

SnapshotKey 

Fields

Instances

Instances details
Show head => Show (SnapshotKey head) Source # 
Instance details

Defined in Hydra.Logging.Monitoring.Accounting

Eq head => Eq (SnapshotKey head) Source # 
Instance details

Defined in Hydra.Logging.Monitoring.Accounting

Methods

(==) :: SnapshotKey head -> SnapshotKey head -> Bool Source #

(/=) :: SnapshotKey head -> SnapshotKey head -> Bool Source #

data Accounting head txid Source #

Constructors

Accounting 

Fields

Instances

Instances details
(Show txid, Show head) => Show (Accounting head txid) Source # 
Instance details

Defined in Hydra.Logging.Monitoring.Accounting

Methods

showsPrec :: Int -> Accounting head txid -> ShowS Source #

show :: Accounting head txid -> String Source #

showList :: [Accounting head txid] -> ShowS Source #

(Eq txid, Eq head) => Eq (Accounting head txid) Source # 
Instance details

Defined in Hydra.Logging.Monitoring.Accounting

Methods

(==) :: Accounting head txid -> Accounting head txid -> Bool Source #

(/=) :: Accounting head txid -> Accounting head txid -> Bool Source #

empty :: Accounting head txid Source #

request :: Ord txid => Int -> Double -> Double -> Word64 -> txid -> Accounting head txid -> (Bool, Int, Accounting head txid) Source #

Admission order is monotone. Retries and parked inputs retain their ID, so one high-water mark distinguishes first processing without a set of IDs.

prune :: Ord txid => Int -> Double -> Double -> Accounting head txid -> (Int, Accounting head txid) Source #

forget :: Ord txid => txid -> Accounting head txid -> Accounting head txid Source #

clearPending :: Accounting head txid -> Accounting head txid Source #

startSnapshot :: Eq head => SnapshotKey head -> Maybe Double -> [txid] -> Accounting head txid -> Accounting head txid Source #

confirmSnapshot :: (Eq head, Ord txid) => Double -> SnapshotKey head -> [txid] -> Accounting head txid -> (Bool, Maybe Double, [Double], Accounting head txid) Source #

Returns transactions and durations only when the confirmed number advances within this head. A version bump at the same number does not confirm the transactions again. An unrelated adoption cannot consume a pending timer.