We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c6c786 commit 2184fbbCopy full SHA for 2184fbb
1 file changed
pkg/dxf/framework/proto/node.go
@@ -64,6 +64,8 @@ func getLimitedDXFCPU(totalCPU int, limit int) int {
64
if totalCPU <= 0 || limit >= 100 {
65
return totalCPU
66
}
67
+ // use CEIL might cause the real limit to be higher than the given limit.
68
+ // as DXF use slots or CPU cores as the unit of resource, that's acceptable.
69
usableCPU := int(math.Ceil(float64(totalCPU) * float64(limit) / 100))
70
if usableCPU < 1 {
71
return 1
0 commit comments