rename/temp print
This commit is contained in:
parent
fa77b809b8
commit
32f6db5a66
3 changed files with 13 additions and 9 deletions
|
|
@ -18,7 +18,7 @@ import Plutus.V1.Ledger.Api (
|
|||
)
|
||||
import Plutus.V1.Ledger.Api qualified as Plutus
|
||||
|
||||
import Spec.Spec (
|
||||
import Spec.Specification (
|
||||
Specification (Specification),
|
||||
SpecificationExpectation (Success),
|
||||
SpecificationTree (..),
|
||||
|
|
@ -30,11 +30,11 @@ import Spec.Spec (
|
|||
data Benchmark = Benchmark
|
||||
{ name :: Text
|
||||
-- ^ Human readable name describing script.
|
||||
, bCPUBudget :: ExCPU
|
||||
, cpuBudget :: ExCPU
|
||||
-- ^ The on-chain execution cost of a script.
|
||||
, bMemoryBudget :: ExMemory
|
||||
, memoryBudget :: ExMemory
|
||||
-- ^ The on-chain memory budget of a script.
|
||||
, bScriptSize :: Int
|
||||
, scriptSize :: Int
|
||||
-- ^ The on-chain size of a script.
|
||||
}
|
||||
deriving stock (Show, Eq, Ord, Generic)
|
||||
|
|
@ -43,9 +43,9 @@ instance ToNamedRecord Benchmark where
|
|||
toNamedRecord (Benchmark {..}) =
|
||||
namedRecord
|
||||
[ "name" .= name
|
||||
, "cpu" .= bCPUBudget
|
||||
, "mem" .= bMemoryBudget
|
||||
, "size" .= bScriptSize
|
||||
, "cpu" .= cpuBudget
|
||||
, "mem" .= memoryBudget
|
||||
, "size" .= scriptSize
|
||||
]
|
||||
|
||||
instance DefaultOrdered Benchmark where
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import Spec.Effect.GovernorMutation qualified as GovernorMutation
|
|||
import Spec.Effect.TreasuryWithdrawal qualified as TreasuryWithdrawal
|
||||
import Spec.Governor qualified as Governor
|
||||
import Spec.Proposal qualified as Proposal
|
||||
import Spec.Spec (group)
|
||||
import Spec.Specification (group)
|
||||
import Spec.Stake qualified as Stake
|
||||
import Spec.Treasury qualified as Treasury
|
||||
import Prelude
|
||||
|
|
@ -20,6 +20,11 @@ main :: IO ()
|
|||
main = do
|
||||
I.writeFile "bench.csv" $
|
||||
(decodeUtf8 . encodeDefaultOrderedByName) $
|
||||
res
|
||||
|
||||
mapM_ print res
|
||||
where
|
||||
res =
|
||||
specificationTreeToBenchmarks $
|
||||
group
|
||||
"Benchmark"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue