Skip to content

Commit e0c1e5c

Browse files
committed
cardano-node: Commented out drepCount and drepMapSize
1 parent 4f5ddd9 commit e0c1e5c

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

cardano-node/src/Cardano/Node/Tracing/Tracers/LedgerMetrics.hs

+17-16
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ data LedgerMetrics =
8383
tsSlotNo :: SlotNo
8484
, tsUtxoSize :: Int
8585
, tsDelegMapSize :: Int
86-
, tsDRepCount :: Int
87-
, tsDRepMapSize :: Int
86+
-- , tsDRepCount :: Int
87+
-- , tsDRepMapSize :: Int
8888
, tsChainDensity :: Double
8989
}
9090

@@ -102,22 +102,22 @@ traceLedgerMetrics ::
102102
traceLedgerMetrics nodeKern slotNo tracer = do
103103
query <- mapNodeKernelDataIO
104104
(\nk ->
105-
(,,,,)
105+
(,,) -- (,,,,)
106106
<$> nkQueryLedger (ledgerUtxoSize . ledgerState) nk
107107
<*> nkQueryLedger (ledgerDelegMapSize . ledgerState) nk
108-
<*> nkQueryLedger (ledgerDRepCount . ledgerState) nk
109-
<*> nkQueryLedger (ledgerDRepMapSize . ledgerState) nk
108+
-- <*> nkQueryLedger (ledgerDRepCount . ledgerState) nk
109+
-- <*> nkQueryLedger (ledgerDRepMapSize . ledgerState) nk
110110
<*> nkQueryChain fragmentChainDensity nk)
111111
nodeKern
112112
case query of
113113
SNothing -> pure ()
114-
SJust (utxoSize, delegMapSize, drepCount, drepMapSize, chainDensity) ->
114+
SJust (utxoSize, delegMapSize, {- drepCount, drepMapSize, -} chainDensity) ->
115115
let msg = LedgerMetrics
116116
slotNo
117117
utxoSize
118118
delegMapSize
119-
drepCount
120-
drepMapSize
119+
-- drepCount
120+
-- drepMapSize
121121
(fromRational chainDensity)
122122
in traceWith tracer msg
123123

@@ -131,22 +131,23 @@ instance LogFormatting LedgerMetrics where
131131
, "slot" .= toJSON (unSlotNo tsSlotNo)
132132
, "utxoSize" .= Number (fromIntegral tsUtxoSize)
133133
, "delegMapSize" .= Number (fromIntegral tsDelegMapSize)
134-
, "drepCount" .= Number (fromIntegral tsDRepCount)
135-
, "drepMapSize" .= Number (fromIntegral tsDRepMapSize)
134+
-- , "drepCount" .= Number (fromIntegral tsDRepCount)
135+
-- , "drepMapSize" .= Number (fromIntegral tsDRepMapSize)
136136
, "chainDensity" .= Number (fromRational (toRational tsChainDensity))
137137
]
138138
forHuman LedgerMetrics {..} =
139139
"Ledger metrics "
140140
<> " utxoSize " <> showT tsUtxoSize
141141
<> " delegMapSize " <> showT tsDelegMapSize
142-
<> " drepCount" <> showT tsDRepCount
143-
<> " drepMapSize" <> showT tsDRepMapSize
142+
-- <> " drepCount" <> showT tsDRepCount
143+
-- <> " drepMapSize" <> showT tsDRepMapSize
144144
<> " chainDensity " <> showT tsChainDensity
145145
asMetrics LedgerMetrics {..} =
146146
[ IntM "utxoSize" (fromIntegral tsUtxoSize)
147147
, IntM "delegMapSize" (fromIntegral tsDelegMapSize)
148-
, IntM "drepCount" (fromIntegral tsDRepCount)
149-
, IntM "drepMapSize" (fromIntegral tsDRepMapSize)]
148+
-- , IntM "drepCount" (fromIntegral tsDRepCount)
149+
-- , IntM "drepMapSize" (fromIntegral tsDRepMapSize)
150+
]
150151

151152

152153
instance MetaTrace LedgerMetrics where
@@ -157,8 +158,8 @@ instance MetaTrace LedgerMetrics where
157158
metricsDocFor (Namespace _ ["LedgerMetrics"]) =
158159
[ ("utxoSize", "Size of the current UTxO set (number of entries)")
159160
, ("delegMapSize", "Size of the delegation map (number of delegators)")
160-
, ("drepCount", "Number of active DReps (Delegated Representatives)")
161-
, ("drepMapSize", "Size of the DRep map (number of stake keys mapped to DReps)")
161+
-- , ("drepCount", "Number of active DReps (Delegated Representatives)")
162+
-- , ("drepMapSize", "Size of the DRep map (number of stake keys mapped to DReps)")
162163
]
163164
metricsDocFor _ = []
164165

0 commit comments

Comments
 (0)