mafoc-0.0.0.1
Safe HaskellSafe-Inferred
LanguageHaskell2010

Mafoc.Logging

Synopsis

Trace severity levels

traceEmerg :: Trace IO Text -> Doc () -> IO () #

traceCritical :: Trace IO Text -> Doc () -> IO () #

traceAlert :: Trace IO Text -> Doc () -> IO () #

traceError :: Trace IO Text -> Doc () -> IO () #

traceWarning :: Trace IO Text -> Doc () -> IO () #

traceNotice :: Trace IO Text -> Doc () -> IO () #

traceInfo :: Trace IO Text -> Doc () -> IO () #

traceDebug :: Trace IO Text -> Doc () -> IO () #

mkDocLog :: (Trace IO Text -> Text -> IO ()) -> Trace IO Text -> Doc ann -> IO () #

renderPretty :: Pretty a => a -> Text #

renderDefault :: Doc a -> Text #

Profiling

data ProfilingConfig #

Constructors

ProfilingConfig 

Fields

Instances

Instances details
Show ProfilingConfig # 
Instance details

Defined in Mafoc.Logging

data ProfilingRuntime #

Constructors

ProfilingRuntime 

Fields

Instances

Instances details
Show ProfilingRuntime # 
Instance details

Defined in Mafoc.Logging

getHandle :: String -> (Doc () -> IO ()) -> IO Handle #

API

profileStep :: ProfilingRuntime -> Stream (Of (ChainSyncEvent (BlockInMode CardanoMode))) IO r -> Stream (Of (ChainSyncEvent (BlockInMode CardanoMode))) IO r #

profilerEnd :: ProfilingRuntime -> Maybe ChainPoint -> IO () #

Get event data

getResourcesEvent :: Pid -> IO (KeyMap Value) #

getStartEvent :: String -> Pid -> IO (KeyMap Value) #

getProcessTimesKm :: IO (KeyMap Value) #

getRss :: Pid -> IO (KeyMap Value) #

getLiveBytes :: IO (KeyMap Value) #

syncStatsKv :: SyncStats -> KeyMap Value #

Helpers

bs8show :: Show a => a -> ByteString #

hPutLn :: Handle -> ByteString -> IO () #

Log sync stats

data SyncStats #

Constructors

SyncStats 

Fields

mkEmptyStats :: UTCTime -> SyncStats #

logging :: Trace IO Text -> ChainsyncStats -> Stream (Of (ChainSyncEvent (BlockInMode CardanoMode))) IO r -> Stream (Of (ChainSyncEvent (BlockInMode CardanoMode))) IO r #

syncStatsStep :: SyncStats -> ChainSyncEvent (BlockInMode CardanoMode) -> (ChainPoint, ChainTip, SyncStats) #

mkMessage :: SyncStats -> NominalDiffTime -> ChainPoint -> ChainTip -> Doc a #

reportBlocks :: Int -> NominalDiffTime -> Doc ann #

reportRollbacks :: Int -> NominalDiffTime -> Doc ann #

syncStatus :: ChainPoint -> ChainTip -> Doc a #