optimize: shedding algorithm performance (#3908)

This commit is contained in:
Kevin Wan
2024-02-15 20:22:22 +08:00
committed by GitHub
parent 8ceb2885db
commit 9c17499757
8 changed files with 605 additions and 18 deletions

View File

@@ -53,7 +53,7 @@ type (
MaxBytes int64 `json:",default=1048576"`
// milliseconds
Timeout int64 `json:",default=3000"`
CpuThreshold int64 `json:",default=900,range=[0:1000]"`
CpuThreshold int64 `json:",default=900,range=[0:1000)"`
Signature SignatureConf `json:",optional"`
// There are default values for all the items in Middlewares.
Middlewares MiddlewaresConf

View File

@@ -18,7 +18,7 @@ var (
Name: "duration_ms",
Help: "http server requests duration(ms).",
Labels: []string{"path", "method"},
Buckets: []float64{5, 10, 25, 50, 100, 250, 500, 1000},
Buckets: []float64{5, 10, 25, 50, 100, 250, 500, 750, 1000},
})
metricServerReqCodeTotal = metric.NewCounterVec(&metric.CounterVecOpts{