Search code examples
pythoncode-coveragecoverage.py

coverage in parallel used all cpu resource


I'm using coverage3.8, version 5.3 with C extension.

I used command: coverage3.8 run --parallel-mode xxx.py and used htop to check the CPU usage. Then I found the CPU usage is off the chart.

I wonder if there is a variable/option that can set/limit how many CPU nodes that coverage3.8 can use?


Solution

  • --parallel-mode just tells coverage to name the data files with a unique number so that more than one can be created at once. It doesn't cause processes to spawn. Your program must be doing that. What does your program do?