|
| 1 | +{-# LANGUAGE Trustworthy #-} |
| 2 | +{-# LANGUAGE OverloadedStrings #-} |
| 3 | + |
| 4 | +-------------------------------------------------------------------------------- |
| 5 | + |
| 6 | +module Cardano.Benchmarking.Profile.Playground ( |
| 7 | + profilesNoEraPlayground |
| 8 | +) where |
| 9 | + |
| 10 | +-------------------------------------------------------------------------------- |
| 11 | + |
| 12 | +import Prelude |
| 13 | +import Data.Function ((&)) |
| 14 | +-- Package: aeson. |
| 15 | +import qualified Data.Aeson as Aeson |
| 16 | +import qualified Data.Aeson.KeyMap as KeyMap |
| 17 | +-- Package: self. |
| 18 | +import qualified Cardano.Benchmarking.Profile.Builtin.Miniature as M |
| 19 | +import qualified Cardano.Benchmarking.Profile.Primitives as P |
| 20 | +import qualified Cardano.Benchmarking.Profile.Types as Types |
| 21 | +import qualified Cardano.Benchmarking.Profile.Vocabulary as V |
| 22 | + |
| 23 | +-------------------------------------------------------------------------------- |
| 24 | + |
| 25 | +-- Corrections to fill the block memory budget with 4 txs per block. |
| 26 | +calibrate15x :: Aeson.Object |
| 27 | +calibrate15x = |
| 28 | + KeyMap.fromList [ |
| 29 | + ("genesis", Aeson.Object $ KeyMap.fromList [ |
| 30 | + ("alonzo", Aeson.Object $ KeyMap.fromList [ |
| 31 | + ("maxTxExUnits", Aeson.Object $ KeyMap.fromList [ |
| 32 | + ("exUnitsMem", Aeson.Number 23250000) |
| 33 | + ]) |
| 34 | + ]) |
| 35 | + ]) |
| 36 | + , ("generator", Aeson.Object $ KeyMap.fromList [ |
| 37 | + -- "ns":"Mempool.RejectedTx","data":{"err":{"fee":1000000,"kind":"FeeTooSmallUTxO","minimum":1892175} |
| 38 | + ("tx_fee", Aeson.Number 1892175) |
| 39 | + ]) |
| 40 | + ] |
| 41 | + |
| 42 | +-- Corrections to fill the block memory budget with 4 txs per block. |
| 43 | +calibrate2x :: Aeson.Object |
| 44 | +calibrate2x = |
| 45 | + KeyMap.fromList [ |
| 46 | + ("genesis", Aeson.Object $ KeyMap.fromList [ |
| 47 | + ("alonzo", Aeson.Object $ KeyMap.fromList [ |
| 48 | + ("maxTxExUnits", Aeson.Object $ KeyMap.fromList [ |
| 49 | + ("exUnitsMem", Aeson.Number 31000000) |
| 50 | + ]) |
| 51 | + ]) |
| 52 | + ]) |
| 53 | + , ("generator", Aeson.Object $ KeyMap.fromList [ |
| 54 | + -- "ns":"Mempool.RejectedTx","data":{"err":{"fee":2463202,"kind":"FeeTooSmallUTxO","minimum":2463246} |
| 55 | + ("tx_fee", Aeson.Number 2463246) |
| 56 | + ]) |
| 57 | + ] |
| 58 | + |
| 59 | +profilesNoEraPlayground :: [Types.Profile] |
| 60 | +profilesNoEraPlayground = |
| 61 | + ------------------------------------------------------------------------------ |
| 62 | + -- ci-bench like: 2 nodes, FixedLoaded and "--shutdown-on-block-synced 15" |
| 63 | + ------------------------------------------------------------------------------ |
| 64 | + let ciBenchLike = |
| 65 | + P.empty & M.base . P.dreps 0 |
| 66 | + . P.uniCircle . P.loopback . V.hosts 2 |
| 67 | + . M.benchDuration |
| 68 | + . P.traceForwardingOn . P.newTracing |
| 69 | + . P.p2pOn |
| 70 | + . V.clusterDefault -- TODO: "cluster" should be "null" here. |
| 71 | + . V.genesisVariantVoltaire |
| 72 | + -- Cloud Plutus workload |
| 73 | + . V.plutusTypeLoop . V.plutusBase . P.tps 0.85 |
| 74 | + . P.analysisSizeSmall |
| 75 | + mem15x = P.budgetBlockMemoryOneAndAHalf |
| 76 | + mem2x = P.budgetBlockMemoryDouble |
| 77 | + in [ |
| 78 | + -- Voltaire (like cloud profiles) |
| 79 | + -- Baseline. |
| 80 | + ciBenchLike & P.name "calibrate-volt" |
| 81 | + , ciBenchLike & P.name "calibrate-blockmem-x1.5-volt" . mem15x |
| 82 | + , ciBenchLike & P.name "calibrate-blockmem-x1.5-volt-fill" . mem15x . P.overlay calibrate15x |
| 83 | + , ciBenchLike & P.name "calibrate-blockmem-x2-volt" . mem2x |
| 84 | + , ciBenchLike & P.name "calibrate-blockmem-x2-volt-fill" . mem2x . P.overlay calibrate2x |
| 85 | + ] |
0 commit comments