| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Tools.DBAnalyser.HasAnalysis
Synopsis
- class (HasAnnTip blk, GetPrevHash blk, Condense (HeaderHash blk)) ⇒ HasAnalysis blk where
- countTxOutputs ∷ blk → Int
- blockTxSizes ∷ blk → [SizeInBytes]
- knownEBBs ∷ proxy blk → Map (HeaderHash blk) (ChainHash blk)
- emitTraces ∷ WithLedgerState blk → [String]
- blockStats ∷ blk → [TextBuilder]
- blockApplicationMetrics ∷ [(TextBuilder, WithLedgerState blk → IO TextBuilder)]
- class HasProtocolInfo blk where
- data Args blk
- mkProtocolInfo ∷ Args blk → IO (ProtocolInfo blk)
- mkLSMConfig ∷ Args blk → IO LSMConfig
- data LSMConfig = LSMConfig {}
- data SizeInBytes
- data WithLedgerState blk = WithLedgerState {
- wlsBlk ∷ blk
- wlsStateBefore ∷ LedgerState blk ValuesMK
- wlsStateAfter ∷ LedgerState blk ValuesMK
Documentation
class (HasAnnTip blk, GetPrevHash blk, Condense (HeaderHash blk)) ⇒ HasAnalysis blk where Source #
Methods
countTxOutputs ∷ blk → Int Source #
blockTxSizes ∷ blk → [SizeInBytes] Source #
knownEBBs ∷ proxy blk → Map (HeaderHash blk) (ChainHash blk) Source #
emitTraces ∷ WithLedgerState blk → [String] Source #
Emit trace markers at points in processing.
blockStats ∷ blk → [TextBuilder] Source #
This method was introduced for the sake of the BenchmarkLedgerOps pass.
blockApplicationMetrics ∷ [(TextBuilder, WithLedgerState blk → IO TextBuilder)] Source #
This function allows to define different metrics about block application.
The block application metrics will be stored in a CSV file. This method is used by 'db-analyser' to define the headers of the resulting data, and how to compute, for a given row, each column of the metrics.
The first component of each element in blockApplicationMetrics
represents a header in the resulting CSV file.
Given a block application 'x :: WithLedgerState blk', the metrics
for that block application are calculated using the second
component of blockApplicationMetrics.
The block application metrics are mapped to an IO action because certain metrics such as the size of data need to be performed in the IO monad.
Instances
class HasProtocolInfo blk where Source #
Minimal complete definition
Methods
mkProtocolInfo ∷ Args blk → IO (ProtocolInfo blk) Source #
mkLSMConfig ∷ Args blk → IO LSMConfig Source #
The LSM-trees configuration to use when the LedgerDB runs on the LSM backend. Defaults to no configuration (no snapshot exporting); only the Cardano instance overrides this, reading the values from the node configuration file.
Instances
LSM-trees configuration relevant to db-analyser.
Constructors
| LSMConfig | |
Fields
| |
data SizeInBytes #
Instances
| ToJSON SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes Methods toJSON ∷ SizeInBytes → Value Source # toEncoding ∷ SizeInBytes → Encoding Source # toJSONList ∷ [SizeInBytes] → Value Source # toEncodingList ∷ [SizeInBytes] → Encoding Source # omitField ∷ SizeInBytes → Bool Source # | |||||
| NFData SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes Methods rnf ∷ SizeInBytes → () # | |||||
| Monoid SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes | |||||
| Semigroup SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes Methods (<>) ∷ SizeInBytes → SizeInBytes → SizeInBytes # sconcat ∷ NonEmpty SizeInBytes → SizeInBytes # stimes ∷ Integral b ⇒ b → SizeInBytes → SizeInBytes # | |||||
| Eq SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes | |||||
| Ord SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes Methods compare ∷ SizeInBytes → SizeInBytes → Ordering # (<) ∷ SizeInBytes → SizeInBytes → Bool # (<=) ∷ SizeInBytes → SizeInBytes → Bool # (>) ∷ SizeInBytes → SizeInBytes → Bool # (>=) ∷ SizeInBytes → SizeInBytes → Bool # max ∷ SizeInBytes → SizeInBytes → SizeInBytes # min ∷ SizeInBytes → SizeInBytes → SizeInBytes # | |||||
| Bounded SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes | |||||
| Enum SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes Methods succ ∷ SizeInBytes → SizeInBytes # pred ∷ SizeInBytes → SizeInBytes # toEnum ∷ Int → SizeInBytes # fromEnum ∷ SizeInBytes → Int # enumFrom ∷ SizeInBytes → [SizeInBytes] # enumFromThen ∷ SizeInBytes → SizeInBytes → [SizeInBytes] # enumFromTo ∷ SizeInBytes → SizeInBytes → [SizeInBytes] # enumFromThenTo ∷ SizeInBytes → SizeInBytes → SizeInBytes → [SizeInBytes] # | |||||
| Generic SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes Associated Types
| |||||
| Num SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes Methods (+) ∷ SizeInBytes → SizeInBytes → SizeInBytes # (-) ∷ SizeInBytes → SizeInBytes → SizeInBytes # (*) ∷ SizeInBytes → SizeInBytes → SizeInBytes # negate ∷ SizeInBytes → SizeInBytes # abs ∷ SizeInBytes → SizeInBytes # | |||||
| Integral SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes Methods quot ∷ SizeInBytes → SizeInBytes → SizeInBytes # rem ∷ SizeInBytes → SizeInBytes → SizeInBytes # div ∷ SizeInBytes → SizeInBytes → SizeInBytes # mod ∷ SizeInBytes → SizeInBytes → SizeInBytes # quotRem ∷ SizeInBytes → SizeInBytes → (SizeInBytes, SizeInBytes) # divMod ∷ SizeInBytes → SizeInBytes → (SizeInBytes, SizeInBytes) # toInteger ∷ SizeInBytes → Integer # | |||||
| Real SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes Methods | |||||
| Show SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes Methods showsPrec ∷ Int → SizeInBytes → ShowS # show ∷ SizeInBytes → String # showList ∷ [SizeInBytes] → ShowS # | |||||
| BoundedMeasure SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes Methods | |||||
| Measure SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes Methods plus ∷ SizeInBytes → SizeInBytes → SizeInBytes Source # min ∷ SizeInBytes → SizeInBytes → SizeInBytes Source # max ∷ SizeInBytes → SizeInBytes → SizeInBytes Source # | |||||
| NoThunks SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes | |||||
| type Rep SizeInBytes # | |||||
Defined in Ouroboros.Network.SizeInBytes type Rep SizeInBytes = D1 ('MetaData "SizeInBytes" "Ouroboros.Network.SizeInBytes" "ouroboros-network-1.2.0.0-l-api-af495335aa766cc933ee95df4ec7fdea2dd796e1efa726c7d4b40b7590fdf5d9" 'True) (C1 ('MetaCons "SizeInBytes" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSizeInBytes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32))) | |||||
data WithLedgerState blk Source #
Constructors
| WithLedgerState | |
Fields
| |