minermedic/miner_results.py
def populate_chip_results(self, miner, chips):

        """
        Build chip status and chip summary strings and populate the results
        :param miner: Miner Object
        :param chips: MinerChipStats Object
        :return: None
        """

        # build a status dict
        chip_status =  {'active': chips.chips_working,
                        'failed': chips.chips_defective,
                        'missing': chips.chips_missing}

        # get some working totals
        chips_bad = chips.chips_defective+chips.chips_missing
        chips_total = chips.chips_working + chips_bad
        chip_status_percent = (chips.chips_working / chips_total) * 100.0

        # set a result of chip status as a percent
        self.set_result(miner, 'miner_chips_status', chip_status_percent)

        # set the actual chip summary stats as a dict
        self.set_result(miner, 'miner_chips', {'detail': chip_status,
                                               'total': chips.chips_total,
                                               'active': chips.chips_working})

        # add a direct lookup summary string

        #if chips_bad == 0:
        #    chip_summary = str(chips.chips_working)
        #else:
        #    chip_summary = str(chips.chips_working) + "." + str(chips_bad)
        # self.set_result(miner, 'miner_chips_summary', {'summary': chip_summary})

        Build chip status and chip summary strings and populate the results
        :param miner: Miner Object
        :param chips: MinerChipStats Object
        :return: None
        
Build chip status and chip summary strings and populate the results
Build chip status and chip summary strings and populate the results
def populate_chip_results(self, miner, chips):
        chip_status =  {'active': chips.chips_working,
                        'failed': chips.chips_defective,
                        'missing': chips.chips_missing}
        chips_bad = chips.chips_defective+chips.chips_missing
        chips_total = chips.chips_working + chips_bad
        chip_status_percent = (chips.chips_working / chips_total) * 100.0
        self.set_result(miner, 'miner_chips_status', chip_status_percent)
        self.set_result(miner, 'miner_chips', {'detail': chip_status,
                                               'total': chips.chips_total,
                                               'active': chips.chips_working})
         + "." + str(chips_bad)
def populate_chip_results ( self , miner , chips ) : chip_status = { 'active' : chips . chips_working , 'failed' : chips . chips_defective , 'missing' : chips . chips_missing } chips_bad = chips . chips_defective + chips . chips_missing chips_total = chips . chips_working + chips_bad chip_status_percent = ( chips . chips_working / chips_total ) * 100.0 self . set_result ( miner , 'miner_chips_status' , chip_status_percent ) self . set_result ( miner , 'miner_chips' , { 'detail' : chip_status , 'total' : chips . chips_total , 'active' : chips . chips_working } )
Build chip status and chip summary strings and populate the results
Build chip status and chip summary strings and populate the results
"""
        Build chip status and chip summary strings and populate the results
        :param miner: Miner Object
        :param chips: MinerChipStats Object
        :return: None
        """ # build a status dict # get some working totals # set a result of chip status as a percent # set the actual chip summary stats as a dict # add a direct lookup summary string #if chips_bad == 0: #    chip_summary = str(chips.chips_working) #else: #    chip_summary = str(chips.chips_working) + "." + str(chips_bad) # self.set_result(miner, 'miner_chips_summary', {'summary': chip_summary})
None
self
miner
None
chips
None