(self, cur_read)
Compute cpu percent basing on the provided utilisation
Compute cpu percent basing on the provided utilisation
Compute cpu percent basing on the provided utilisation
def _add_cpu_percent(self, cur_read):
        """Compute cpu percent basing on the provided utilisation
        """
        for executor_id, cur_data in cur_read.items():
            stats = cur_data['statistics']
            cpus_limit = stats.get('cpus_limit')
            cpus_utilisation = stats.get('cpus_utilisation')
            if cpus_utilisation and cpus_limit != 0:
                stats['cpus_percent'] = cpus_utilisation / cpus_limit
def _add_cpu_percent ( self , cur_read ) : for executor_id , cur_data in cur_read . items ( ) : stats = cur_data [ 'statistics' ] cpus_limit = stats . get ( 'cpus_limit' ) cpus_utilisation = stats . get ( 'cpus_utilisation' ) if cpus_utilisation and cpus_limit != 0 : stats [ 'cpus_percent' ] = cpus_utilisation / cpus_limit