Skip to content

limit must be in the range of 1 to 000 #106

Description

@antiphp

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions