Skip to content

Commit 97a7f41

Browse files
committed
WIP
1 parent 5ab000b commit 97a7f41

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

bench/locli/app/locli-quick.hs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import Cardano.Api (ExceptT, SlotNo (..), runExceptT)
99

1010
import Cardano.Analysis.API.Ground (JsonInputFile (..))
11+
import Cardano.Analysis.Quick.Types ()
1112
import Cardano.Analysis.Reducer
1213
import Cardano.Analysis.Reducer.Util
1314
import Cardano.Unlog.BackendDB
@@ -291,22 +292,21 @@ parserQuickQuery =
291292
CMDQuery
292293
<$> pure ()
293294
<*> parseRuns
294-
<*> pure []
295+
<*> parseHosts
295296
<*> switch (short 'd' <> long "dump-only" <> help "dump result blob to stdout only; don't process")
296297
where
297-
{-
298-
parseScriptName =
299-
strArgument (help "name of a known script" <> metavar "NAME")
300-
<|> strArgument (help "custom serialized script file" <> metavar "FILE" <> completer (bashCompleter "file"))
301-
parseParamPath =
302-
strOption $ long "param" <> metavar "JSON" <> completer (bashCompleter "file")
303-
<> help "protocol parameter file; default: data/protocol-parameters-v10.json"
304-
parseBudgetHint =
305-
option auto $ long "hint" <> metavar "BUDGET"
306-
<> help "Which budget does the script target? <Mem|Steps>"
307-
-}
298+
parseHosts = parseNodes <|> parseAllNodes
299+
300+
parseAllNodes =
301+
flag' [] $ long "all-nodes"
302+
<> help "explicitly query all nodes; potentially expensive operation"
303+
304+
parseNodes =
305+
option readCommaSepList $ long "nodes" <> short 'n' <> metavar "node(s)"
306+
<> help "comma-separated list of node names (e.g. node-10,node20) to query"
307+
308308
parseRuns =
309-
option readCommaSepList $ long "run" <> short 'r' <> metavar "run(s)"
309+
option readCommaSepList $ long "runs" <> short 'r' <> metavar "run(s)"
310310
<> help "comma-separated list of run dirs or log manifest JSONs, or a single SQLite DB"
311311

312312
readCommaSepList :: Opt.ReadM [String]

bench/locli/src-quick/Cardano/Analysis/Quick/Types.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import Cardano.Unlog.LogObjectDB (SummaryDB (..))
1717
import Cardano.Util (I)
1818

1919
import Codec.Serialise (Serialise (..))
20+
import Data.Map.Strict (Map)
2021
import Data.Profile (ProfileEntry)
2122
import Data.Text.Short (ShortText, fromShortByteString, toShortByteString)
2223
import GHC.Generics (Generic)
@@ -59,7 +60,7 @@ data RemoteQueryMeta = QueryRemote
5960
data RemoteQueryResult
6061
= RemoteQueryResult
6162
{ rqrQuery :: ()
62-
, rqrResult :: RunLogs LoadRawResult
63+
, rqrResult :: Map String (RunLogs LoadRawResult) -- map key: runId
6364
}
6465
| RemoteQueryError
6566
{ rqrError :: String

0 commit comments

Comments
 (0)