opsengine/cpulimit

limit must be in the range of 1 to 000

antiphp opened this issue · 0 comments

It looks like the CPU counter does not work and gives me zero instead of 4, resulting in a max limit of 0 (or 000) instead of 400.

$ cpulimit -l 10 go test -count 10 ./...
Error: limit must be in the range of 1 to 000
CPUlimit version 2.6

...

      -l, --limit=N      percentage of cpu allowed from 1 up.
                         Usually 1 - 000, but can be higher
                         on multi-core CPUs (mandatory)

I occasionally can make it work, sometimes seeing 400 instead of 000, I thought using -cpu 4 could solve the underlying issue, but that is not the case. Dropping -count 1 for go test makes it work though, but not a satisfying solution.