plutus-chain-index-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Plutus.ChainIndex.SyncStats

Synopsis

Documentation

data SyncStats Source #

Constructors

SyncStats 

Fields

Instances

Instances details
Eq SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Show SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Generic SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Associated Types

type Rep SyncStats :: Type -> Type Source #

Semigroup SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Monoid SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

ToJSON SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

FromJSON SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

ToObject SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

toObject :: TracingVerbosity -> SyncStats -> Object

textTransformer :: SyncStats -> Object -> Text

type Rep SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

type Rep SyncStats = D1 ('MetaData "SyncStats" "Plutus.ChainIndex.SyncStats" "plutus-chain-index-0.1.0.0-AutU6txMhTt30vgN7V9qVP" 'False) (C1 ('MetaCons "SyncStats" 'PrefixI 'True) ((S1 ('MetaSel ('Just "syncStatsAppliedBlocks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer) :*: S1 ('MetaSel ('Just "syncStatsAppliedRollbacks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)) :*: (S1 ('MetaSel ('Just "syncStatsChainSyncPoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Point) :*: S1 ('MetaSel ('Just "syncStatsNodePoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Point))))

data SyncLog Source #

Constructors

SyncLog 

Fields

Instances

Instances details
Eq SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Show SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Generic SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Associated Types

type Rep SyncLog :: Type -> Type Source #

ToJSON SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

FromJSON SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Pretty SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

pretty :: SyncLog -> Doc ann Source #

prettyList :: [SyncLog] -> Doc ann Source #

ToObject SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

toObject :: TracingVerbosity -> SyncLog -> Object

textTransformer :: SyncLog -> Object -> Text

type Rep SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

type Rep SyncLog = D1 ('MetaData "SyncLog" "Plutus.ChainIndex.SyncStats" "plutus-chain-index-0.1.0.0-AutU6txMhTt30vgN7V9qVP" 'False) (C1 ('MetaCons "SyncLog" 'PrefixI 'True) (S1 ('MetaSel ('Just "syncStateSyncLog") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyncState) :*: (S1 ('MetaSel ('Just "syncStatsSyncLog") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyncStats) :*: S1 ('MetaSel ('Just "syncPeriodSyncLog") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Second))))

data SyncState Source #

Instances

Instances details
Eq SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Show SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Generic SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Associated Types

type Rep SyncState :: Type -> Type Source #

ToJSON SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

FromJSON SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Pretty SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

pretty :: SyncState -> Doc ann Source #

prettyList :: [SyncState] -> Doc ann Source #

ToObject SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

toObject :: TracingVerbosity -> SyncState -> Object

textTransformer :: SyncState -> Object -> Text

type Rep SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

type Rep SyncState = D1 ('MetaData "SyncState" "Plutus.ChainIndex.SyncStats" "plutus-chain-index-0.1.0.0-AutU6txMhTt30vgN7V9qVP" 'False) (C1 ('MetaCons "Synced" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Syncing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)) :+: C1 ('MetaCons "NotSyncing" 'PrefixI 'False) (U1 :: Type -> Type)))

logProgress :: forall effs. Member (LogMsg SyncLog) effs => [ChainSyncEvent] -> TimeSpec -> Eff effs () Source #

Log syncing summary.

getSyncStateFromStats :: SyncStats -> SyncState Source #

Get the SyncState for a SyncState.

TODO: The syncing percentage is valid when the node is already fully synced. But when the node and chain-index are started at the same time, the syncing percentage is not a valid number considering the actual tip of the node. Find a better way to calculate this percentage.