(self)
return StressController(stress_installed, firestarter_installed)
Configures the possible stress processes and modes
Configures the possible stress processes and modes
Configures the possible stress processes and modes
def _config_stress(self):
        """ Configures the possible stress processes and modes """
        # Configure stress_process
        self.stress_exe = None
        stress_installed = False
        self.stress_exe = which('stress')
        if self.stress_exe:
            stress_installed = True
        else:
            self.stress_exe = which('stress-ng')
            if self.stress_exe:
                stress_installed = True

        self.firestarter = None
        firestarter_installed = False
        if os.path.isfile('./FIRESTARTER/FIRESTARTER'):
            self.firestarter = os.path.join(os.getcwd(),
                                            'FIRESTARTER', 'FIRESTARTER')
            firestarter_installed = True
        else:
            firestarter_exe = which('FIRESTARTER')
            if firestarter_exe is not None:
                self.firestarter = firestarter_exe
                firestarter_installed = True

        return StressController(stress_installed, firestarter_installed)
def _config_stress ( self ) : # Configure stress_process self . stress_exe = None stress_installed = False self . stress_exe = which ( 'stress' ) if self . stress_exe : stress_installed = True else : self . stress_exe = which ( 'stress-ng' ) if self . stress_exe : stress_installed = True self . firestarter = None firestarter_installed = False if os . path . isfile ( './FIRESTARTER/FIRESTARTER' ) : self . firestarter = os . path . join ( os . getcwd ( ) , 'FIRESTARTER' , 'FIRESTARTER' ) firestarter_installed = True else : firestarter_exe = which ( 'FIRESTARTER' ) if firestarter_exe is not None : self . firestarter = firestarter_exe firestarter_installed = True return StressController ( stress_installed , firestarter_installed )