Skip to content

Commit

Permalink
Small changes to run benchmarks for lots of transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
noonio committed Oct 30, 2024
1 parent f0d2fa0 commit 665d705
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hydra-node/bench/micro-bench/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ main = do

prepareTx :: IO (UTxO, Tx)
prepareTx =
second List.head <$> generate (genFixedSizeSequenceOfSimplePaymentTransactions 1)
second List.head <$> generate (genFixedSizeSequenceOfSimplePaymentTransactions 4_000_000)

benchApplyTxs :: (UTxO, Tx) -> Either (Tx, ValidationError) UTxO
benchApplyTxs (utxo, tx) = applyTransactions defaultLedger (ChainSlot 1) utxo [tx]
Expand Down
7 changes: 5 additions & 2 deletions hydra-node/hydra-node.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,18 @@ benchmark micro
build-depends:
, aeson
, base
, criterion
, hydra-cardano-api
, hydra-node
, hydra-node:testlib
, hydra-prelude
, hydra-tx
, QuickCheck
, tasty-bench

ghc-options: -threaded -rtsopts
mixins:
tasty-bench (Test.Tasty.Bench as Criterion, Test.Tasty.Bench as Criterion.Main)

ghc-options: -threaded -rtsopts -with-rtsopts=-N4

test-suite tests
import: project-config
Expand Down

0 comments on commit 665d705

Please sign in to comment.