@@ -12,8 +12,6 @@ import Control.Concurrent.Class.MonadSTM (
12
12
check ,
13
13
lengthTBQueue ,
14
14
modifyTVar ,
15
- newTBQueueIO ,
16
- newTVarIO ,
17
15
tryReadTBQueue ,
18
16
writeTBQueue ,
19
17
writeTVar ,
@@ -83,7 +81,7 @@ bench startingNodeId timeoutSeconds workDir dataset = do
83
81
putTextLn " Starting benchmark"
84
82
let cardanoKeys = hydraNodeKeys dataset <&> \ sk -> (getVerificationKey sk, sk)
85
83
let hydraKeys = generateSigningKey . show <$> [1 .. toInteger (length cardanoKeys)]
86
- statsTvar <- newTVarIO mempty
84
+ statsTvar <- newLabelledTVarIO " bench-stats " mempty
87
85
scenarioData <- withOSStats workDir statsTvar $
88
86
withCardanoNodeDevnet (contramap FromCardanoNode tracer) workDir $ \ _ backend -> do
89
87
let nodeSocket' = case Backend. getOptions backend of
@@ -261,13 +259,14 @@ withOSStats workDir tvar action =
261
259
Nothing -> action
262
260
Just _ ->
263
261
withCreateProcess process{std_out = CreatePipe } $ \ _stdin out _stderr _processHandle ->
264
- race
265
- ( do
262
+ raceLabelled
263
+ ( " os-stats-collect"
264
+ , do
266
265
-- Write the header
267
266
atomically $ writeTVar tvar [" | Time | Used | Free | " , " |------------------------------------|------|------|" ]
268
267
collectStats tvar out
269
268
)
270
- action
269
+ ( " os-stats- action" , action)
271
270
>>= \ case
272
271
Left _ -> failure " dool process failed unexpectedly"
273
272
Right a -> pure a
@@ -384,7 +383,7 @@ processTransactions clients clientDatasets = do
384
383
385
384
clientProcessDataset (ClientDataset {txSequence}, client) clientId = do
386
385
let numberOfTxs = length txSequence
387
- submissionQ <- newTBQueueIO (fromIntegral numberOfTxs)
386
+ submissionQ <- newLabelledTBQueueIO " submission " (fromIntegral numberOfTxs)
388
387
registry <- newRegistry
389
388
atomically $ forM_ txSequence $ writeTBQueue submissionQ
390
389
( submitTxs client registry submissionQ
@@ -443,8 +442,8 @@ data Registry tx = Registry
443
442
newRegistry ::
444
443
IO (Registry Tx )
445
444
newRegistry = do
446
- processedTxs <- newTVarIO mempty
447
- latestSnapshot <- newTVarIO 0
445
+ processedTxs <- newLabelledTVarIO " registry-processed-txs " mempty
446
+ latestSnapshot <- newLabelledTVarIO " registry-latest-snapshot " 0
448
447
pure $ Registry {processedTxs, latestSnapshot}
449
448
450
449
submitTxs ::
0 commit comments