Skip to content

stress-ng version

Compare
Choose a tag to compare
@salehsedghpour salehsedghpour released this 21 Jun 07:59
· 35 commits to main since this release
789ac76

Note: Replace the image version to use version 2.0 instead of latest
In this version, we were able to customize both memory, cpu and network for each requests. There is a drawback for this case for short requests like 1ms which took around 30ms because of calling them from a subprocess, or os.system or ctypes like:

        from ctypes import *
        so_file = "/usr/src/app/stress-ng/stress-ng"
        my_functions = CDLL(so_file)
       
        my_functions.main.argtypes = c_int,POINTER(c_char_p)
        args = (c_char_p * 11)(
            b'',
            b'--class',b'cpu',
            b'--cpu',str(conf['workers']).encode('utf-8'),
            b'--cpu-method', str(conf['method']).encode('utf-8'),
            b'--cpu-load',str(conf['cpu_load']).encode('utf-8'),
            b'--timeout',str(conf['execution_time']).encode('utf-8'),
        )


        my_functions.main(len(args),args)

What's Changed

New Contributors

Full Changelog: v1.0...v2.0