Skip to content

Commit

Permalink
Try maxInflight = 10u: 1587 m/s
Browse files Browse the repository at this point in the history
  • Loading branch information
haf committed Jun 7, 2018
1 parent 4ad2257 commit 21e5736
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/targets/Logary.Targets.Stackdriver/Target_Stackdriver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ type StackdriverConf =
resource = defaultArg resource Global
labels = defaultArg labels HashMap.empty
maxBatchSize = defaultArg batchSize 50us
maxInflight = defaultArg maxInflight 5us }
maxInflight = defaultArg maxInflight 10us }

let empty: StackdriverConf =
StackdriverConf.create "CHANGE_PROJECT_ID"
Expand Down Expand Up @@ -243,23 +243,23 @@ module internal Impl =
Job.iterateServer 0u <| fun inflight ->
comm ^=> function
| Acquire (replyCh, nack) when inflight = maxPar ->
printfn "Acquire, Inflight=%i (maxPar), q=%i" inflight q.Count
//printfn "Acquire, Inflight=%i (maxPar), q=%i" inflight q.Count
q.Enqueue (replyCh, nack)
Alt.always inflight

| Acquire (replyCh, nack) ->
printfn "Acquire, Inflight=%i, q=%i" inflight q.Count
//printfn "Acquire, Inflight=%i, q=%i" inflight q.Count
Alt.choosy [| replyCh *<- () ^->. inflight + 1u
nack ^->. inflight |]

| Release when inflight <> 0u && q.Count > 0 ->
printfn "Release (inflight <> 0, q <> 0), q=%i" q.Count
//printfn "Release (inflight <> 0, q <> 0), q=%i" q.Count
let replyCh, nack = q.Dequeue()
Alt.choosy [| replyCh *<- () ^->. inflight
nack ^->. inflight - 1u |]

| Release when inflight <> 0u ->
printfn "Release (inflight <> 0), q=%i" q.Count
//printfn "Release (inflight <> 0), q=%i" q.Count
Alt.always (inflight - 1u)

| Release ->
Expand Down

0 comments on commit 21e5736

Please sign in to comment.