ouroboros-network-0.1.0.0: A networking layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.PeerSelection.PeerMetric

Documentation

type SlotMetric p = IntPSQ SlotNo (p, Time) Source #

data PeerMetrics m p Source #

Constructors

PeerMetrics 

Fields

reportMetric ∷ ∀ m p. MonadSTM m ⇒ PeerMetrics m p → ReportPeerMetrics m (ConnectionId p) Source #

nullMetric ∷ MonadSTM m ⇒ ReportPeerMetrics m p Source #

headerMetricTracer ∷ ∀ m p. MonadSTM m ⇒ PeerMetrics m p → Tracer (STM m) (TraceLabelPeer (ConnectionId p) (SlotNo, Time)) Source #

fetchedMetricTracer ∷ ∀ m p. MonadSTM m ⇒ PeerMetrics m p → Tracer (STM m) (TraceLabelPeer (ConnectionId p) (SizeInBytes, SlotNo, Time)) Source #

getHeaderMetrics ∷ MonadSTM m ⇒ PeerMetrics m p → STM m (SlotMetric p) Source #

getFetchedMetrics ∷ MonadSTM m ⇒ PeerMetrics m p → STM m (SlotMetric (p, SizeInBytes)) Source #

metricsTracer ∷ ∀ m p. MonadSTM m ⇒ StrictTVar m (SlotMetric p) → Tracer (STM m) (TraceLabelPeer p (SlotNo, Time)) Source #

newPeerMetric ∷ MonadSTM m ⇒ m (PeerMetrics m p) Source #

upstreamyness ∷ ∀ p. Ord p ⇒ SlotMetric p → Map p Int Source #

fetchynessBytes ∷ ∀ p. Ord p ⇒ SlotMetric (p, SizeInBytes) → Map p Int Source #