Skip to content

Commit

Permalink
Also print how many clients have not had a transaction seen
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1bo committed Jul 27, 2021
1 parent 3e64582 commit 7d8936f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions exe/tail/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import Hydra.Tail.Simulation.Options (
)
import Hydra.Tail.Simulation.SlotNo (unSlotNo)
import Text.Pretty.Simple (pPrint)
import qualified Data.Map as Map

main :: IO ()
main = do
Expand All @@ -41,8 +42,9 @@ main = do
pPrint summary

let trace = runSimulation options events
txs <- withProgressReport (lastSlot summary) options $ \reportProgress ->
analyzeSimulation reportProgress trace
txs <- withProgressReport (lastSlot summary) options $ \reportProgress -> do
let fn = \balances -> (numberOfClients summary - fromIntegral (Map.size balances), balances)
analyzeSimulation (\sn x -> reportProgress sn (fn <$> x)) trace
pPrint $ mkAnalyze defaultAnalyzeOptions txs

let res = resultName options summary
Expand Down
1 change: 1 addition & 0 deletions hydra-sim.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ executable hydra-tail-simulation
build-depends: base
, hydra-sim -any
, pretty-simple
, containers
ghc-options: -O2 -threaded -rtsopts

executable hydra-head-simulation
Expand Down

0 comments on commit 7d8936f

Please sign in to comment.