Skip to content

Commit a226311

Browse files
committed
Debug timing
1 parent 9292d81 commit a226311

20 files changed

+94
-13
lines changed

.github/workflows/haskell.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ jobs:
141141
run: |
142142
cabal test cardano-testnet cardano-node cardano-node-chairman cardano-submit-api
143143
144+
- name: Timings
145+
run: |
146+
cd cardano-testnet
147+
stat -c "%y %n" * | grep '\(start\|stop\)' | sort
148+
144149
- name: Tar failed tests workspaces
145150
if: ${{ failure() }}
146151
env:

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/LeadershipSchedule.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,15 @@ import Hedgehog (Property, (===))
4848
import qualified Hedgehog as H
4949
import Hedgehog.Extras (threadDelay)
5050
import qualified Hedgehog.Extras.Stock.IO.Network.Sprocket as IO
51-
import qualified Hedgehog.Extras.Test.Base as H
52-
import qualified Hedgehog.Extras.Test.File as H
51+
import qualified Hedgehog.Extras.Test as H
5352

5453
-- | Execute me with:
5554
-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/leadership-schedule/"'@
5655
hprop_leadershipSchedule :: Property
5756
hprop_leadershipSchedule = H.integrationRetryWorkspace 2 "babbage-leadership-schedule" $ \tempAbsBasePath' -> do
57+
H.threadDelay 1000
58+
H.writeFile "hprop_leadershipSchedule.start" "hprop_leadershipSchedule"
59+
5860
H.note_ SYS.os
5961
conf@Conf { tempAbsPath=tempAbsPath@(TmpAbsolutePath work) } <- mkConf tempAbsBasePath'
6062
let tempBaseAbsPath = makeTmpBaseAbsPath tempAbsPath
@@ -355,3 +357,4 @@ hprop_leadershipSchedule = H.integrationRetryWorkspace 2 "babbage-leadership-sch
355357
H.noteShow_ (expectedLeadershipSlotNumbers \\ leaderSlots)
356358
H.assert $ L.null (expectedLeadershipSlotNumbers \\ leaderSlots)
357359
-}
360+
H.writeFile "hprop_leadershipSchedule.stop" "hprop_leadershipSchedule"

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/StakeSnapshot.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@ import Testnet.Runtime
2929
import Hedgehog (Property, (===))
3030
import qualified Hedgehog as H
3131
import qualified Hedgehog.Extras.Stock.IO.Network.Sprocket as IO
32-
import qualified Hedgehog.Extras.Test.Base as H
32+
import qualified Hedgehog.Extras.Test as H
3333

3434
hprop_stakeSnapshot :: Property
3535
hprop_stakeSnapshot = H.integrationRetryWorkspace 2 "babbage-stake-snapshot" $ \tempAbsBasePath' -> do
36+
H.threadDelay 1000
37+
H.writeFile "hprop_stakeSnapshot-b.start" "hprop_stakeSnapshot"
38+
3639
H.note_ SYS.os
3740
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
3841
let tempAbsPath' = unTmpAbsPath tempAbsPath
@@ -69,3 +72,5 @@ hprop_stakeSnapshot = H.integrationRetryWorkspace 2 "babbage-stake-snapshot" $ \
6972
Aeson.Object kmPools -> KM.size kmPools === 3
7073
_ -> H.failure
7174
_ -> H.failure
75+
76+
H.writeFile "hprop_stakeSnapshot-b.stop" "hprop_stakeSnapshot"

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/Transaction.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ import Testnet.Runtime
3636

3737
import Hedgehog (Property)
3838
import qualified Hedgehog as H
39-
import qualified Hedgehog.Extras.Test.Base as H
40-
import qualified Hedgehog.Extras.Test.File as H
39+
import qualified Hedgehog.Extras.Test as H
4140

4241
hprop_transaction :: Property
4342
hprop_transaction = H.integrationRetryWorkspace 0 "babbage-transaction" $ \tempAbsBasePath' -> do
43+
H.threadDelay 1000
44+
H.writeFile "hprop_transaction-b.start" "hprop_transaction"
45+
4446
H.note_ SYS.os
4547
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
4648
let tempAbsPath' = unTmpAbsPath tempAbsPath
@@ -121,6 +123,7 @@ hprop_transaction = H.integrationRetryWorkspace 0 "babbage-transaction" $ \tempA
121123
UTxO utxo2 <- H.noteShowM $ decodeEraUTxO sbe utxo2Json
122124
txouts2 <- H.noteShow $ L.unCoin . txOutValueLovelace . txOutValue . snd <$> Map.toList utxo2
123125
H.assert $ 5_000_001 `List.elem` txouts2
126+
H.writeFile "hprop_transaction-b.stop" "hprop_transaction"
124127

125128
txOutValue :: TxOut ctx era -> TxOutValue era
126129
txOutValue (TxOut _ v _ _) = v

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Conway/DRepRetirement.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ sbe = ShelleyBasedEraConway
4040
-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/DRepRetirement/"'@
4141
hprop_drep_retirement :: Property
4242
hprop_drep_retirement = H.integrationRetryWorkspace 2 "drep-retirement" $ \tempAbsBasePath' -> do
43+
H.threadDelay 1000
44+
H.writeFile "hprop_drep_retirement.start" "hprop_drep_retirement"
45+
4346
-- Start a local test net
4447
conf@Conf { tempAbsPath } <- H.noteShowM $ mkConf tempAbsBasePath'
4548
let tempAbsPath' = unTmpAbsPath tempAbsPath
@@ -141,3 +144,4 @@ hprop_drep_retirement = H.integrationRetryWorkspace 2 "drep-retirement" $ \tempA
141144
-- to witness that the number of dreps indeed decreased.
142145
checkDRepsNumber sbe configFile' socketPath' execConfig (sizeBefore - 1)
143146
H.success
147+
H.writeFile "hprop_drep_retirement.stop" "hprop_drep_retirement"

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Conway/Plutus.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ import qualified Hedgehog.Extras as H
4949
-- Proposing NO
5050
hprop_plutus_v3 :: Property
5151
hprop_plutus_v3 = H.integrationWorkspace "all-plutus-script-purposes" $ \tempAbsBasePath' -> do
52+
H.threadDelay 1000
53+
H.writeFile "hprop_plutus_v3.start" "hprop_plutus_v3"
54+
5255
H.note_ SYS.os
5356
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
5457
let tempAbsPath' = unTmpAbsPath tempAbsPath
@@ -220,5 +223,6 @@ hprop_plutus_v3 = H.integrationWorkspace "all-plutus-script-purposes" $ \tempAbs
220223
, "--tx-file", spendScriptUTxOTx
221224
]
222225
H.success
226+
H.writeFile "hprop_plutus_v3.stop" "hprop_plutus_v3"
223227

224228

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Conway/StakeSnapshot.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@ import Testnet.Runtime
2626
import Hedgehog (Property, (===))
2727
import qualified Hedgehog as H
2828
import qualified Hedgehog.Extras.Stock.IO.Network.Sprocket as IO
29-
import qualified Hedgehog.Extras.Test.Base as H
29+
import qualified Hedgehog.Extras.Test as H
3030

3131
hprop_stakeSnapshot :: Property
3232
hprop_stakeSnapshot = H.integrationRetryWorkspace 2 "conway-stake-snapshot" $ \tempAbsBasePath' -> do
33+
H.threadDelay 1000
34+
H.writeFile "hprop_stakeSnapshot-c.start" "hprop_stakeSnapshot"
35+
3336
H.note_ SYS.os
3437
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
3538
let tempAbsPath' = unTmpAbsPath tempAbsPath
@@ -66,3 +69,4 @@ hprop_stakeSnapshot = H.integrationRetryWorkspace 2 "conway-stake-snapshot" $ \t
6669
Aeson.Object kmPools -> KM.size kmPools === 3
6770
_ -> H.failure
6871
_ -> H.failure
72+
H.writeFile "hprop_stakeSnapshot-c.stop" "hprop_stakeSnapshot"

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/KesPeriodInfo.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,13 @@ import Hedgehog (Property)
4242
import qualified Hedgehog as H
4343
import Hedgehog.Extras (threadDelay)
4444
import Hedgehog.Extras.Stock (sprocketSystemName)
45-
import qualified Hedgehog.Extras.Test.Base as H
46-
import qualified Hedgehog.Extras.Test.File as H
45+
import qualified Hedgehog.Extras.Test as H
4746

4847
hprop_kes_period_info :: Property
4948
hprop_kes_period_info = H.integrationRetryWorkspace 2 "kes-period-info" $ \tempAbsBasePath' -> do
49+
H.threadDelay 1000
50+
H.writeFile "hprop_kes_period_info.start" "hprop_kes_period_info"
51+
5052
H.note_ SYS.os
5153
conf@Conf { tempAbsPath=tempAbsPath@(TmpAbsolutePath work) }
5254
-- TODO: Move yaml filepath specification into individual node options
@@ -341,3 +343,4 @@ hprop_kes_period_info = H.integrationRetryWorkspace 2 "kes-period-info" $ \tempA
341343

342344
spoLogFile <- H.note nodeStdout
343345
prop_node_minted_block spoLogFile
346+
H.writeFile "hprop_kes_period_info.stop" "hprop_kes_period_info"

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Queries.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ import qualified Hedgehog.Extras.Test.Golden as H
4343
-- RECREATE_GOLDEN_FILES=1 as its prefix
4444
hprop_cli_queries :: Property
4545
hprop_cli_queries = H.integrationWorkspace "cli-queries" $ \tempAbsBasePath' -> do
46+
H.threadDelay 1000
47+
H.writeFile "hprop_cli_queries.start" "hprop_cli_queries"
48+
4649
conf@Conf { tempAbsPath=tempAbsPath@(TmpAbsolutePath work) }
4750
<- mkConf tempAbsBasePath'
4851
let tempBaseAbsPath = makeTmpBaseAbsPath tempAbsPath
@@ -123,6 +126,7 @@ hprop_cli_queries = H.integrationWorkspace "cli-queries" $ \tempAbsBasePath' ->
123126
H.noteM_ $ H.execCli' execConfig [ "conway", "query", "drep-state", "--all-dreps"
124127
, "--out-file", drepStateOutFile]
125128
_ :: Aeson.Value <- H.leftFailM . H.readJsonFile $ drepStateOutFile
129+
H.writeFile "hprop_cli_queries.stop" "hprop_cli_queries"
126130

127131
H.success
128132

@@ -152,4 +156,3 @@ assertArrayOfSize v n =
152156
failWrongType got = do
153157
H.note_ $ "Expected a JSON object, but received: " <> got
154158
H.failure
155-

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/QuerySlotNumber.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,15 @@ import Testnet.Runtime
3131

3232
import Hedgehog (Property)
3333
import qualified Hedgehog.Extras.Stock as H
34-
import qualified Hedgehog.Extras.Test.Base as H
34+
import qualified Hedgehog.Extras.Test as H
3535
import qualified Hedgehog.Internal.Property as H
3636

3737
-- | Tests @query slot-number@ cardano-cli command that it returns correct slot numbers for provided utc time
3838
hprop_querySlotNumber :: Property
3939
hprop_querySlotNumber = H.integrationRetryWorkspace 2 "query-slot-number" $ \tempAbsBasePath' -> do
40+
H.threadDelay 1000
41+
H.writeFile "hprop_querySlotNumber.start" "hprop_querySlotNumber"
42+
4043
H.note_ SYS.os
4144
conf <- mkConf tempAbsBasePath'
4245

@@ -119,6 +122,8 @@ hprop_querySlotNumber = H.integrationRetryWorkspace 2 "query-slot-number" $ \tem
119122
]
120123
H.assertWith result isLeft
121124

125+
H.writeFile "hprop_querySlotNumber.stop" "hprop_querySlotNumber"
126+
122127
formatTime :: DT.UTCTime -> String
123128
formatTime = DT.formatTime DT.defaultTimeLocale "%Y-%m-%dT%H:%M:%SZ"
124129

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/FoldBlocks.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ instance Show FoldBlocksException where
4040
-- that main thread blocks on.
4141
prop_foldBlocks :: H.Property
4242
prop_foldBlocks = H.integrationRetryWorkspace 2 "foldblocks" $ \tempAbsBasePath' -> do
43+
H.threadDelay 1000
44+
H.writeFile "prop_foldBlocks.start" "prop_foldBlocks"
45+
4346
-- Start testnet
4447
conf <- TN.mkConf tempAbsBasePath'
4548

@@ -77,4 +80,5 @@ prop_foldBlocks = H.integrationRetryWorkspace 2 "foldblocks" $ \tempAbsBasePath'
7780
-- test to finish.
7881
_ <- H.evalIO $ H.timeout 30_000_000 $ IO.readMVar lock
7982
H.assert True
83+
H.writeFile "prop_foldBlocks.stop" "prop_foldBlocks"
8084

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/LedgerEvents/Gov/DRepDeposits.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ import qualified Hedgehog.Extras.Stock.IO.Network.Sprocket as IO
3636
-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/DRep Deposits/"'@
3737
hprop_ledger_events_drep_deposits :: Property
3838
hprop_ledger_events_drep_deposits = H.integrationWorkspace "drep-deposits" $ \tempAbsBasePath' -> do
39+
H.threadDelay 1000
40+
H.writeFile "hprop_ledger_events_drep_deposits.start" "hprop_ledger_events_drep_deposits"
3941

4042
-- Start a local test net
4143
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
@@ -110,5 +112,6 @@ hprop_ledger_events_drep_deposits = H.integrationWorkspace "drep-deposits" $ \te
110112

111113
checkDRepState sbe (File configurationFile) (File socketPath) execConfig
112114
(\m -> if map L.drepDeposit (Map.elems m) == [L.Coin minDRepDeposit] then Just () else Nothing)
115+
H.writeFile "hprop_ledger_events_drep_deposits.stop" "hprop_ledger_events_drep_deposits"
113116

114117

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/LedgerEvents/Gov/InfoAction.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ import qualified Hedgehog.Extras.Stock.IO.Network.Sprocket as IO
4646
-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/InfoAction/'@
4747
hprop_ledger_events_info_action :: Property
4848
hprop_ledger_events_info_action = H.integrationRetryWorkspace 0 "info-hash" $ \tempAbsBasePath' -> do
49+
H.threadDelay 1000
50+
H.writeFile "hprop_ledger_events_info_action.start" "hprop_ledger_events_info_action"
4951

5052
-- Start a local test net
5153
conf@Conf { tempAbsPath } <- H.noteShowM $ mkConf tempAbsBasePath'
@@ -225,6 +227,7 @@ hprop_ledger_events_info_action = H.integrationRetryWorkspace 0 "info-hash" $ \t
225227
H.failMessage callStack
226228
$ "foldBlocksCheckInfoAction failed with: " <> displayError e
227229
Right _events -> success
230+
H.writeFile "hprop_ledger_events_info_action.stop" "hprop_ledger_events_info_action"
228231

229232
-- | Fold accumulator for checking action state
230233
data InfoActionState = InfoActionState

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/LedgerEvents/Gov/ProposeNewConstitution.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ import qualified Hedgehog.Extras.Stock.IO.Network.Sprocket as IO
5353
-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/ProposeAndRatifyNewConstitution/"'@
5454
hprop_ledger_events_propose_new_constitution :: Property
5555
hprop_ledger_events_propose_new_constitution = H.integrationWorkspace "propose-new-constitution" $ \tempAbsBasePath' -> do
56+
H.threadDelay 1000
57+
H.writeFile "hprop_ledger_events_propose_new_constitution.start" "hprop_ledger_events_propose_new_constitution"
58+
5659
-- Start a local test net
5760
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
5861
let tempAbsPath' = unTmpAbsPath tempAbsPath
@@ -279,6 +282,7 @@ hprop_ledger_events_propose_new_constitution = H.integrationWorkspace "propose-n
279282
length (filter (== "VoteNo") votes) === 3
280283
length (filter (== "Abstain") votes) === 2
281284
length votes === numVotes
285+
H.writeFile "hprop_ledger_events_propose_new_constitution.stop" "hprop_ledger_events_propose_new_constitution"
282286

283287
foldBlocksCheckConstitutionWasRatified
284288
:: String -- submitted constitution hash

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/LedgerEvents/Gov/ProposeNewConstitutionSPO.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ import qualified Hedgehog.Extras.Stock.IO.Network.Sprocket as IO
5252
-- @cabal test cardano-testnet-test --test-options '-p "/ProposeNewConstitutionSPO/"'@
5353
hprop_ledger_events_propose_new_constitution_spo :: Property
5454
hprop_ledger_events_propose_new_constitution_spo = H.integrationWorkspace "propose-new-constitution-spo" $ \tempAbsBasePath' -> do
55+
H.threadDelay 1000
56+
H.writeFile "hprop_ledger_events_propose_new_constitution_spo.start" "hprop_ledger_events_propose_new_constitution_spo"
57+
5558
conf@Conf { tempAbsPath=tempAbsPath@(TmpAbsolutePath work) }
5659
<- mkConf tempAbsBasePath'
5760
let tempAbsPath' = unTmpAbsPath tempAbsPath
@@ -224,6 +227,7 @@ hprop_ledger_events_propose_new_constitution_spo = H.integrationWorkspace "propo
224227

225228
exitCode H./== ExitSuccess -- Dit it fail?
226229
H.assert $ "DisallowedVoters" `isInfixOf` stderr -- Did it fail for the expected reason?
230+
H.writeFile "hprop_ledger_events_propose_new_constitution_spo.stop" "hprop_ledger_events_propose_new_constitution_spo"
227231

228232
getConstitutionProposal
229233
:: (HasCallStack, MonadCatch m, MonadIO m, MonadTest m)

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/LedgerEvents/SanityCheck.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import Testnet.Runtime
2525

2626
import Hedgehog
2727
import qualified Hedgehog.Extras.Stock.IO.Network.Sprocket as IO
28-
import qualified Hedgehog.Extras.Test.Base as H
28+
import qualified Hedgehog.Extras.Test as H
2929

3030
newtype AdditionalCatcher
3131
= IOE IOException
@@ -42,6 +42,9 @@ newtype AdditionalCatcher
4242
-- setting timeouts for expected results etc.
4343
hprop_ledger_events_sanity_check :: Property
4444
hprop_ledger_events_sanity_check = H.integrationWorkspace "ledger-events-sanity-check" $ \tempAbsBasePath' -> do
45+
H.threadDelay 1000
46+
H.writeFile "hprop_ledger_events_sanity_check.start" "hprop_ledger_events_sanity_check"
47+
4548
-- Start a local test net
4649
conf <- mkConf tempAbsBasePath'
4750

@@ -75,6 +78,7 @@ hprop_ledger_events_sanity_check = H.integrationWorkspace "ledger-events-sanity-
7578
Right (Left e) ->
7679
H.failMessage callStack $ "foldBlocks failed with: " <> displayError e
7780
Right (Right _v) -> success
81+
H.writeFile "hprop_ledger_events_sanity_check.stop" "hprop_ledger_events_sanity_check"
7882

7983

8084
foldBlocksAccumulator

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/LedgerEvents/TreasuryGrowth.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ import qualified Hedgehog.Extras.Test as H
3232
-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/Treasury Growth/"'@
3333
prop_check_if_treasury_is_growing :: H.Property
3434
prop_check_if_treasury_is_growing = H.integrationRetryWorkspace 0 "growing-treasury" $ \tempAbsBasePath' -> do
35+
H.threadDelay 1000
36+
H.writeFile "prop_check_if_treasury_is_growing.start" "prop_check_if_treasury_is_growing"
37+
3538
-- Start testnet
3639
conf@Conf{tempAbsPath=TmpAbsolutePath tempAbsPath'} <- TN.mkConf tempAbsBasePath'
3740

@@ -67,6 +70,7 @@ prop_check_if_treasury_is_growing = H.integrationRetryWorkspace 0 "growing-treas
6770
else do
6871
H.note_ "treasury is not growing"
6972
H.failure
73+
H.writeFile "prop_check_if_treasury_is_growing.stop" "prop_check_if_treasury_is_growing"
7074
where
7175
handler :: AnyNewEpochState -> SlotNo -> BlockNo -> StateT (Map EpochNo Integer) IO LedgerStateCondition
7276
handler (AnyNewEpochState _ newEpochState) _slotNo _blockNo = do

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Node/Shutdown.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ hprop_shutdown = H.integrationRetryWorkspace 2 "shutdown" $ \tempAbsBasePath' ->
184184

185185
hprop_shutdownOnSlotSynced :: Property
186186
hprop_shutdownOnSlotSynced = H.integrationRetryWorkspace 2 "shutdown-on-slot-synced" $ \tempAbsBasePath' -> do
187+
H.threadDelay 1000
188+
H.writeFile "hprop_shutdownOnSlotSynced.start" "hprop_shutdownOnSlotSynced"
189+
187190
-- Start a local test net
188191
-- TODO: Move yaml filepath specification into individual node options
189192
conf <- mkConf tempAbsBasePath'
@@ -228,11 +231,15 @@ hprop_shutdownOnSlotSynced = H.integrationRetryWorkspace 2 "shutdown-on-slot-syn
228231

229232
let epsilon = 50
230233
H.assertWithinTolerance slotTip maxSlot epsilon
234+
H.writeFile "hprop_shutdownOnSlotSynced.stop" "hprop_shutdownOnSlotSynced"
231235

232236
-- Execute this test with:
233237
-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/ShutdownOnSigint/"'@
234238
hprop_shutdownOnSigint :: Property
235239
hprop_shutdownOnSigint = H.integrationRetryWorkspace 2 "shutdown-on-sigint" $ \tempAbsBasePath' -> do
240+
H.threadDelay 1000
241+
H.writeFile "hprop_shutdownOnSigint.start" "hprop_shutdownOnSigint"
242+
236243
-- Start a local test net
237244
-- TODO: Move yaml filepath specification into individual node options
238245
conf <- mkConf tempAbsBasePath'
@@ -263,6 +270,7 @@ hprop_shutdownOnSigint = H.integrationRetryWorkspace 2 "shutdown-on-sigint" $ \t
263270
[] -> H.failMessage callStack "Could not find close DB message."
264271
(Left err):_ -> H.failMessage callStack err
265272
(Right _):_ -> pure ()
273+
H.writeFile "hprop_shutdownOnSigint.stop" "hprop_shutdownOnSigint"
266274

267275

268276
parseMsg :: String -> Maybe (Either String Integer)

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/SubmitApi/Babbage/Transaction.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@ import Testnet.SubmitApi
4444

4545
import Hedgehog (Property, (===))
4646
import qualified Hedgehog as H
47-
import qualified Hedgehog.Extras.Test.Base as H
48-
import qualified Hedgehog.Extras.Test.File as H
47+
import qualified Hedgehog.Extras.Test as H
4948
import qualified Hedgehog.Extras.Test.Golden as H
5049

5150
hprop_transaction :: Property
5251
hprop_transaction = H.integrationRetryWorkspace 0 "submit-api-babbage-transaction" $ \tempAbsBasePath' -> do
52+
H.threadDelay 1000
53+
H.writeFile "hprop_transaction-c.start" "hprop_transaction"
54+
5355
H.note_ SYS.os
5456
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
5557
let tempAbsPath' = unTmpAbsPath tempAbsPath
@@ -188,6 +190,7 @@ hprop_transaction = H.integrationRetryWorkspace 0 "submit-api-babbage-transactio
188190
H.evalIO $ LBS.writeFile txFailedResponseYamlFp $ Aeson.encodePretty v
189191

190192
H.diffFileVsGoldenFile txFailedResponseYamlFp txFailedResponseYamlGoldenFp
193+
H.writeFile "hprop_transaction-c.stop" "hprop_transaction"
191194

192195
redactHashLbs :: LBS.ByteString -> LBS.ByteString
193196
redactHashLbs =

timings.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
( cd cardano-testnet
4+
stat -c "%y %n" * | grep '\(start\|stop\)' | sort
5+
)

0 commit comments

Comments
 (0)