Skip to content

Commit

Permalink
Tidy tool
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink committed Sep 11, 2023
1 parent 2eeab15 commit da780e5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tools/Equinox.Tool/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,9 @@ module CosmosStats =
let inParallel = p.Contains Parallel
let connector, dName, cName = CosmosInit.connect log sp
let container = connector.CreateUninitialized().GetContainer(dName, cName)
let ops =
[ if doS then yield "Streams", """SELECT VALUE COUNT(1) FROM c WHERE c.id="-1" """
if doD then yield "Documents", """SELECT VALUE COUNT(1) FROM c"""
if doE then yield "Events", """SELECT VALUE SUM(c.n) FROM c WHERE c.id="-1" """ ]
let ops = [| if doS then "Streams", """SELECT VALUE COUNT(1) FROM c WHERE c.id="-1" """
if doD then "Documents", """SELECT VALUE COUNT(1) FROM c"""
if doE then "Events", """SELECT VALUE SUM(c.n) FROM c WHERE c.id="-1" """ |]
log.Information("Computing {measures} ({mode})", Seq.map fst ops, (if inParallel then "in parallel" else "serially"))
ops |> Seq.map (fun (name, sql) -> async {
log.Debug("Running query: {sql}", sql)
Expand Down

0 comments on commit da780e5

Please sign in to comment.