Skip to content

Commit

Permalink
cardano-node Fixes for documantation and txsProcessedNum
Browse files Browse the repository at this point in the history
  • Loading branch information
jutaro committed Nov 4, 2024
1 parent bdd61e0 commit 15ec356
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions cardano-node/src/Cardano/Node/Tracing/Documentation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ import Data.Proxy (Proxy (..))
import qualified Data.Text.IO as T
import GHC.Generics (Generic)
import Network.Mux (MuxTrace (..), WithMuxBearer (..))
import Network.Mux.Trace (TraceLabelPeer (..))
import qualified Network.Socket as Socket
import qualified Options.Applicative as Opt
import System.IO
Expand Down Expand Up @@ -316,6 +317,10 @@ docTracersFirstPhase condConfigFileName = do
blockFetchServerTrDoc <- documentTracer (blockFetchServerTr ::
Trace IO (TraceBlockFetchServerEvent blk))

servedBlockLatestTr <- servedBlockLatest mbTrEKG
servedBlockLatestTrDoc <- documentTracer (servedBlockLatestTr ::
Trace IO (TraceLabelPeer peer (TraceBlockFetchServerEvent blk)))

forgeKESInfoTr <- mkCardanoTracer
trBase trForward mbTrEKG
["Forge"]
Expand Down Expand Up @@ -713,6 +718,7 @@ docTracersFirstPhase condConfigFileName = do
<> blockFetchClientTrDoc
<> blockFetchClientMetricsDoc
<> blockFetchServerTrDoc
<> servedBlockLatestTrDoc
<> forgeKESInfoTrDoc
<> txInboundTrDoc
<> txOutboundTrDoc
Expand Down
3 changes: 2 additions & 1 deletion cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1279,9 +1279,10 @@ instance
[ IntM "txsInMempool" (fromIntegral $ msNumTxs mpSz)
, IntM "mempoolBytes" (fromIntegral . unByteSize32 . msNumBytes $ mpSz)
]
asMetrics (TraceMempoolRemoveTxs _txs mpSz) =
asMetrics (TraceMempoolRemoveTxs txs mpSz) =
[ IntM "txsInMempool" (fromIntegral $ msNumTxs mpSz)
, IntM "mempoolBytes" (fromIntegral . unByteSize32 . msNumBytes $ mpSz)
, CounterM "txsProcessedNum" (Just (fromIntegral $ length txs))
]
asMetrics (TraceMempoolManuallyRemovedTxs [] _txs1 mpSz) =
[ IntM "txsInMempool" (fromIntegral $ msNumTxs mpSz)
Expand Down

0 comments on commit 15ec356

Please sign in to comment.