Skip to content

Commit 1d54718

Browse files
committed
Whitespace
1 parent 4e38bfa commit 1d54718

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/Equinox.CosmosStore/CosmosStore.fs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ module Log =
232232
e.AddPropertyIfAbsent(Serilog.Events.LogEventProperty(PropertyTag, Serilog.Events.ScalarValue(value)))
233233
log.ForContext({ new Serilog.Core.ILogEventEnricher with member _.Enrich(evt, _) = enrich evt })
234234
let internal (|BlobLen|) (x : EventBody) = if x.ValueKind = JsonValueKind.Null then 0 else x.GetRawText().Length
235-
let internal (|EventLen|) (x : #IEventData<_>) = let (BlobLen bytes), (BlobLen metaBytes) = x.Data, x.Meta in bytes + metaBytes + 80
235+
let internal (|EventLen|) (x : #IEventData<_>) = let BlobLen bytes, BlobLen metaBytes = x.Data, x.Meta in bytes + metaBytes + 80
236236
let internal (|BatchLen|) = Seq.sumBy (|EventLen|)
237237
let internal (|SerilogScalar|_|) : Serilog.Events.LogEventPropertyValue -> obj option = function
238238
| :? Serilog.Events.ScalarValue as x -> Some x.Value
@@ -479,12 +479,12 @@ module internal Sync =
479479
let private logged (container, stream) (maxEventsInTip, maxStringifyLen) (exp : SyncExp, req : Tip) (log : ILogger)
480480
: Async<Result> = async {
481481
let! t, (ru, result) = run (container, stream) (maxEventsInTip, maxStringifyLen) (exp, req) |> Stopwatch.Time
482-
let verbose = log.IsEnabled Serilog.Events.LogEventLevel.Debug
483-
let (Log.BatchLen bytes), count = Enum.Events req, req.e.Length
482+
let Log.BatchLen bytes, count = Enum.Events req, req.e.Length
484483
let log =
485484
let inline mkMetric ru : Log.Measurement =
486485
{ database = container.Database.Id; container = container.Id; stream = stream; interval = t; bytes = bytes; count = count; ru = ru }
487486
let inline propConflict log = log |> Log.prop "conflict" true |> Log.prop "eventTypes" (Seq.truncate 5 (seq { for x in req.e -> x.c }))
487+
let verbose = log.IsEnabled Events.LogEventLevel.Debug
488488
if verbose then log |> Log.propEvents (Enum.Events req) |> Log.propDataUnfolds req.u else log
489489
|> match exp with
490490
| SyncExp.Etag et -> Log.prop "expectedEtag" et
@@ -613,7 +613,7 @@ module internal Tip =
613613
(log 0 0 Log.Metric.TipNotFound).Information("EqxCosmos {action:l} {stream} {res} {ms}ms rc={ru}", "Tip", stream, 404, (let e = t.Elapsed in e.TotalMilliseconds), ru)
614614
| ReadResult.Found tip ->
615615
let log =
616-
let (Log.BatchLen bytes), count = Enum.Unfolds tip.u, tip.u.Length
616+
let Log.BatchLen bytes, count = Enum.Unfolds tip.u, tip.u.Length
617617
log bytes count Log.Metric.Tip
618618
let log = if verbose then log |> Log.propDataUnfolds tip.u else log
619619
let log = match maybePos with Some p -> log |> Log.propStartPos p |> Log.propStartEtag p | None -> log
@@ -676,10 +676,10 @@ module internal Query =
676676
Enum.Events(b, ?minIndex = minIndex, ?maxIndex = maxIndex)
677677
|> if direction = Direction.Backward then System.Linq.Enumerable.Reverse else id
678678
let events = batches |> Seq.collect unwrapBatch |> Array.ofSeq
679-
let verbose = log.IsEnabled Events.LogEventLevel.Debug
680-
let (Log.BatchLen bytes), count = events, events.Length
679+
let Log.BatchLen bytes, count = events, events.Length
681680
let reqMetric : Log.Measurement = { database = container.Database.Id; container = container.Id; stream = streamName; interval = t; bytes = bytes; count = count; ru = ru }
682681
let log = let evt = Log.Metric.QueryResponse (direction, reqMetric) in log |> Log.event evt
682+
let verbose = log.IsEnabled Events.LogEventLevel.Debug
683683
let log = if verbose then log |> Log.propEvents events else log
684684
let index = if count = 0 then Nullable () else Nullable <| Seq.min (seq { for x in batches -> x.i })
685685
(log|> Log.prop "bytes" bytes
@@ -691,7 +691,7 @@ module internal Query =
691691
events, maybePosition, ru
692692

693693
let private logQuery direction queryMaxItems (container : Container, streamName) interval (responsesCount, events : ITimelineEvent<EventBody>[]) n (ru : float) (log : ILogger) =
694-
let (Log.BatchLen bytes), count = events, events.Length
694+
let Log.BatchLen bytes, count = events, events.Length
695695
let reqMetric : Log.Measurement = { database = container.Database.Id; container = container.Id; stream = streamName; interval = interval; bytes = bytes; count = count; ru = ru }
696696
let evt = Log.Metric.Query (direction, responsesCount, reqMetric)
697697
let action = match direction with Direction.Forward -> "QueryF" | Direction.Backward -> "QueryB"

0 commit comments

Comments
 (0)