Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- 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
- data ProfilingConfig = ProfilingConfig {
- sampleRate_ :: NominalDiffTime
- destination :: FilePath
- comment :: String
- data ProfilingRuntime = ProfilingRuntime {
- sampleRate :: NominalDiffTime
- handle :: Handle
- pid :: Pid
- getHandle :: String -> (Doc () -> IO ()) -> IO Handle
- profilerInit :: Trace IO Text -> String -> ProfilingConfig -> IO ProfilingRuntime
- profileStep :: ProfilingRuntime -> Stream (Of (ChainSyncEvent (BlockInMode CardanoMode))) IO r -> Stream (Of (ChainSyncEvent (BlockInMode CardanoMode))) IO r
- profilerEnd :: ProfilingRuntime -> Maybe ChainPoint -> IO ()
- 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
- ensureRtsStats :: IO ()
- bs8show :: Show a => a -> ByteString
- hPutLn :: Handle -> ByteString -> IO ()
- data SyncStats = SyncStats {
- syncStatsNumBlocks :: !Int
- syncStatsNumRollbacks :: !Int
- syncStatsLastMessage :: !UTCTime
- 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
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 () #
traceDebug :: Trace IO Text -> Doc () -> IO () #
renderPretty :: Pretty a => a -> Text #
renderDefault :: Doc a -> Text #
Profiling
data ProfilingConfig #
ProfilingConfig | |
|
Instances
Show ProfilingConfig # | |
Defined in Mafoc.Logging showsPrec :: Int -> ProfilingConfig -> ShowS # show :: ProfilingConfig -> String # showList :: [ProfilingConfig] -> ShowS # |
data ProfilingRuntime #
ProfilingRuntime | |
|
Instances
Show ProfilingRuntime # | |
Defined in Mafoc.Logging showsPrec :: Int -> ProfilingRuntime -> ShowS # show :: ProfilingRuntime -> String # showList :: [ProfilingRuntime] -> ShowS # |
profilerInit :: Trace IO Text -> String -> ProfilingConfig -> IO ProfilingRuntime #
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) #
getLiveBytes :: IO (KeyMap Value) #
syncStatsKv :: SyncStats -> KeyMap Value #
Helpers
ensureRtsStats :: IO () #
Log sync stats
SyncStats | |
|
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) #
reportBlocks :: Int -> NominalDiffTime -> Doc ann #
reportRollbacks :: Int -> NominalDiffTime -> Doc ann #
syncStatus :: ChainPoint -> ChainTip -> Doc a #