Skip to content

Commit 186123d

Browse files
committed
cardano-node: block replay human-readable percentage
1 parent b9fe845 commit 186123d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import Ouroboros.Network.Point (withOrigin)
1919
import Control.Concurrent.MVar
2020
import Data.Aeson (Value (String), (.=))
2121
import Data.Text (pack)
22+
import Numeric (showFFloat)
23+
2224

2325
newtype ReplayBlockState = ReplayBlockState
2426
{ -- | Last slot for which a `ReplayBlockStats` message has been issued.
@@ -63,7 +65,7 @@ instance LogFormatting ReplayBlockStats where
6365
<> " out of "
6466
<> textShow (unSlotNo rpsGoalSlot)
6567
<> ". Progress: "
66-
<> textShow (progressForHuman stats)
68+
<> pack (showFFloat (Just 2) (progressForHuman stats) mempty)
6769
<> "%"
6870

6971
asMetrics stats =

0 commit comments

Comments
 (0)