Skip to content

Commit 36f745f

Browse files
committed
mempool-bench: add a message warning that the benchmark can fail intermittently due to unrelated load on the CI runner
1 parent 44f9143 commit 36f745f

File tree

1 file changed

+4
-1
lines changed
  • ouroboros-consensus/bench/mempool-bench

1 file changed

+4
-1
lines changed

ouroboros-consensus/bench/mempool-bench/Main.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import Main.Utf8 (withStdTerminalHandles)
2323
import Ouroboros.Consensus.Ledger.SupportsMempool (ByteSize32)
2424
import qualified Ouroboros.Consensus.Mempool.Capacity as Mempool
2525
import System.Exit (die, exitFailure)
26+
import System.IO (hPutStrLn, stderr)
2627
import qualified Test.Consensus.Mempool.Mocked as Mocked
2728
import Test.Consensus.Mempool.Mocked (MockedMempool)
2829
import Test.Tasty (withResource)
@@ -46,7 +47,9 @@ main = withStdTerminalHandles $ do
4647
Nothing -> exitFailure
4748
Just runIngredient -> do
4849
success <- runIngredient
49-
unless success exitFailure
50+
unless success $ do
51+
hPutStrLn stderr "This benchmark is flaky in GitHub Actions due to CI runner load, which can it to run significantly slower than expected. It may be useful to try to re-run the job if it fails."
52+
exitFailure
5053
where
5154
benchmarkJustAddingTransactions =
5255
bgroup "Just adding" $

0 commit comments

Comments
 (0)