Skip to content

Commit

Permalink
locli: redo chain filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
deepfire committed Jan 17, 2022
1 parent 8d46fb2 commit f1c44ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bench/locli/src/Cardano/Analysis/Driver.hs
Expand Up @@ -100,7 +100,7 @@ runAnalysisCommand (MachineTimelineCmd genesisFile metaFile mChFiltersFile logfi
<&> completeRun runPartial
progress "run" (J run)

filters <- fmap (fromMaybe []) $
filters <- fmap mconcat $
forM mChFiltersFile $
\jf@(JsonSelectorFile f) -> do
firstExceptT (ChainFiltersParseError jf . T.pack)
Expand All @@ -124,7 +124,7 @@ runAnalysisCommand (BlockPropagationCmd genesisFile metaFile mChFiltersFile logf
<&> completeRun runPartial
progress "run" (J run)

filters <- fmap (fromMaybe []) $
filters <- fmap mconcat $
forM mChFiltersFile $
\jf@(JsonSelectorFile f) -> do
firstExceptT (ChainFiltersParseError jf . T.pack)
Expand Down
12 changes: 6 additions & 6 deletions bench/locli/src/Cardano/Unlog/Commands.hs
Expand Up @@ -26,13 +26,13 @@ data AnalysisCommand
= MachineTimelineCmd
JsonGenesisFile
JsonRunMetafile
(Maybe JsonSelectorFile)
[JsonSelectorFile]
[JsonLogfile]
MachineTimelineOutputFiles
| BlockPropagationCmd
JsonGenesisFile
JsonRunMetafile
(Maybe JsonSelectorFile)
[JsonSelectorFile]
[JsonLogfile]
BlockPropagationOutputFiles
| SubstringKeysCmd
Expand Down Expand Up @@ -134,8 +134,8 @@ parseAnalysisCommands =
"Genesis file of the run"
<*> argJsonRunMetafile "run-metafile"
"The meta.json file from the benchmark run"
<*> optional
(argJsonBlockSelectors "chain-filters"
<*> many
(argJsonBlockSelectors "filter"
"List of block selection criteria, as JSON file")
<*> some argJsonLogfile
<*> parseMachineTimelineOutputFiles) $
Expand All @@ -146,8 +146,8 @@ parseAnalysisCommands =
"Genesis file of the run"
<*> argJsonRunMetafile "run-metafile"
"The meta.json file from the benchmark run"
<*> optional
(argJsonBlockSelectors "chain-filters"
<*> many
(argJsonBlockSelectors "filter"
"List of block selection criteria, as JSON file")
<*> many argJsonLogfile
<*> parseBlockPropagationOutputFiles) $
Expand Down

0 comments on commit f1c44ab

Please sign in to comment.