-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
locli & wb: table properties, field precisions, better rendering, Sum…
…mary computation & rendering
- Loading branch information
Showing
13 changed files
with
328 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{-# LANGUAGE UndecidableInstances #-} | ||
{-# OPTIONS_GHC -Wno-name-shadowing -Wno-orphans #-} | ||
module Cardano.Analysis.Summary (module Cardano.Analysis.Summary) where | ||
|
||
import Cardano.Prelude hiding (head) | ||
|
||
import Data.Map.Strict qualified as Map | ||
|
||
import Cardano.Analysis.API | ||
import Cardano.Unlog.LogObject | ||
|
||
|
||
computeSummary :: | ||
UTCTime | ||
-> [[LogObject]] | ||
-> ([FilterName], [ChainFilter]) | ||
-> DataDomain SlotNo | ||
-> DataDomain BlockNo | ||
-> [BlockEvents] | ||
-> Summary | ||
computeSummary sumWhen | ||
objLists | ||
sumFilters | ||
sumDomainSlots | ||
sumDomainBlocks | ||
chainRejecta | ||
= | ||
Summary | ||
{ sumLogStreams = countOfList objLists | ||
, sumLogObjects = countOfLists objLists | ||
, sumBlocksRejected = countOfList chainRejecta | ||
, .. | ||
} | ||
where | ||
sumChainRejectionStats = | ||
chainRejecta | ||
<&> fmap fst . filter (not . snd) . beAcceptance | ||
& concat | ||
& foldr' (\k m -> Map.insertWith (+) k 1 m) Map.empty | ||
& Map.toList |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.