Skip to main content

A simple program for calling stress and/or stress-ng from python

Project description

stressypy uses the unix package stress to stress a certain number of cpus for a certain amount of time, as specified by the user. It creates JobBlock objects which contain pertinent information for using these stress loads to test queueing algorithms.

JobBlock Attributes:

class attributes

  • total_blocks: the number of blocks created

  • waiting_blocks: the number of blocks waiting to be queued - in box

  • queued_blocks: the number of blocks waiting to be executed - in queue

instance attributes

  • n_cpu: number of cpus being stressed

  • t_run: the time it will take to run the job

  • delta_t_run: the time the processor will take to run the job; overhead time

  • state: the state of the block

  • func: the function the block is storing

  • func_args: the arguments for the function the block is storing

  • area: the ‘area’ as width in cpu vs height in time

  • queue: the queue the block will be sent to

  • job: a combination of the func and arg to return the complete job that the block should execute

Installation

stressypy can be installed with pip install stressypy

or cloned manually and setup with python setup.py install

stressypy is dependent on the stress unix package. Make sure you have it installed.

Unix Distro

Command

Debian

sudo apt-get install stress

Arch Linux

pacman -S stress

Directions

stressypy runs using the command stressy stress with the number of cpus and time passed as arguments

  • stressy stress 1 1 stresses 1 core for 1 second

  • stressy stress 7 3 stresses 7 cores for 3 second

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stressypy-0.0.9.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file stressypy-0.0.9.tar.gz.

File metadata

  • Download URL: stressypy-0.0.9.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for stressypy-0.0.9.tar.gz
Algorithm Hash digest
SHA256 60453a67dae698d812dfb4b639929f28c790ef9bdc65f3f7a42d14d830896550
MD5 4348f18d40c496f3330f2ca7472842f3
BLAKE2b-256 2f43332a6041785b977b33d4097ca0f14bfc7151252259d72964a828118801e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page