Sign inSign up

bryancs/python-cpu-stress-test

By bryancs

Updated about 4 years ago

Produces load on configured number of CPU cores

Image
0

168

bryancs/python-cpu-stress-test repository overview

Python CPU Stress Test

Produces load on configured number of CPU cores.

Requirements

  • Docker

Usage

  1. Clone the repo

    git clone https://github.com/iambryancs/python-cpu-stress-test.git
    
  2. Build the image

    # cd to repo
    cd path/to/python-cpu-stress-test
    
    # actual build
    docker build -t python-stress .
    
  3. Run the test

    docker run --rm -e CORE_ALLOC=-2 python-stress
    

Env Vars

  • CORE_ALLOC - number of cores to use
    • Values:
      • -1: use half of the cpus
      • -2: use all the available cpus (minus one)
    • Default: -1
  • STRESS_MINS - number of mins for the test to run
    • Default: 1

Demo

asciicast

Tag summary

Content type

Image

Digest

sha256:539cee781

Size

18.2 MB

Last updated

about 4 years ago

docker pull bryancs/python-cpu-stress-test