File tree 2 files changed +10
-7
lines changed
2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -949,7 +949,7 @@ LEVEL = Info
949
949
950
950
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
951
951
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
952
- ; [service. qos]
952
+ ; [qos]
953
953
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
954
954
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
955
955
; ; Enable request quality of service and load shedding.
Original file line number Diff line number Diff line change @@ -263,12 +263,7 @@ func loadServiceFrom(rootCfg ConfigProvider) {
263
263
mustMapSetting (rootCfg , "service.explore" , & Service .Explore )
264
264
265
265
loadOpenIDSetting (rootCfg )
266
-
267
- qosSection := rootCfg .Section ("service.qos" )
268
- Service .QoS .Enabled = qosSection .Key ("ENABLED" ).MustBool (false )
269
- Service .QoS .MaxInFlightRequests = qosSection .Key ("MAX_INFLIGHT" ).MustInt (4 * runtime .NumCPU ())
270
- Service .QoS .MaxWaitingRequests = qosSection .Key ("MAX_WAITING" ).MustInt (100 )
271
- Service .QoS .TargetWaitTime = qosSection .Key ("TARGET_WAIT_TIME" ).MustDuration (50 * time .Millisecond )
266
+ loadQosSetting (rootCfg )
272
267
}
273
268
274
269
func loadOpenIDSetting (rootCfg ConfigProvider ) {
@@ -290,3 +285,11 @@ func loadOpenIDSetting(rootCfg ConfigProvider) {
290
285
}
291
286
}
292
287
}
288
+
289
+ func loadQosSetting (rootCfg ConfigProvider ) {
290
+ sec := rootCfg .Section ("qos" )
291
+ Service .QoS .Enabled = sec .Key ("ENABLED" ).MustBool (false )
292
+ Service .QoS .MaxInFlightRequests = sec .Key ("MAX_INFLIGHT" ).MustInt (4 * runtime .NumCPU ())
293
+ Service .QoS .MaxWaitingRequests = sec .Key ("MAX_WAITING" ).MustInt (100 )
294
+ Service .QoS .TargetWaitTime = sec .Key ("TARGET_WAIT_TIME" ).MustDuration (50 * time .Millisecond )
295
+ }
You can’t perform that action at this time.
0 commit comments