Get statistics for class

        :type  nid: str
        :param nid: This is the ID of the network to get stats
            from. This is optional and only to override the existing
            `network_id` entered when created the class
969748
def get_stats(self, nid=None):
        
        r = self.request(
            api_type="main",
            method="network.get_stats",
            nid=nid,
        )
        return self._handle_error(r, "Could not retrieve stats for class.")
321582
def stats(self):
        
        response = self.requester.get(
            '/{endpoint}/{id}/stats',
            endpoint=self.endpoint, id=self.id
        )
        return response.json()
409344
def all_stats(klass, account, ids, metric_groups, **kwargs):
        
        params = klass._standard_params(ids, metric_groups, **kwargs)

        resource = klass.RESOURCE_SYNC.format(account_id=account.id)
        response = Request(account.client, 'get', resource, params=params).perform()
        return response.body['data']
941011
def get_by_id(self, id_networkv6):
        

        uri = 'api/networkv4/%s/' % id_networkv6
        return super(ApiNetworkIPv6, self).get(uri)
132178
def network_stats(self):
        
        statistics = {}
        mstp_networks = []
        mstp_map = {}
        ip_devices = []
        bacoids = []
        mstp_devices = []
        for address, bacoid in self.whois_answer[0].keys():
            if ":" in address:
                net, mac = address.split(":")
                mstp_networks.append(net)
                mstp_devices.append(mac)
                try:
                    mstp_map[net].append(mac)
                except KeyError:
                    mstp_map[net] = []
                    mstp_map[net].append(mac)
            else:
                net = "ip"
                mac = address
                ip_devices.append(address)
            bacoids.append((bacoid, address))
        mstpnetworks = sorted(set(mstp_networks))
        statistics["mstp_networks"] = mstpnetworks
        statistics["ip_devices"] = sorted(ip_devices)
        statistics["bacoids"] = sorted(bacoids)
        statistics["mstp_map"] = mstp_map
        statistics["timestamp"] = str(datetime.now())
        statistics["number_of_devices"] = self.number_of_devices
        statistics["number_of_registered_devices"] = len(self.registered_devices)
        statistics["print_mstpnetworks"] = self.print_list(mstpnetworks)
        return statistics
1154502
public static protocolip_stats get(nitro_service service) throws Exception{
		protocolip_stats obj = new protocolip_stats();
		protocolip_stats[] response = (protocolip_stats[])obj.stat_resources(service);
		return response[0];
	}
463192
def get_network_by_id(self, network_id: int) -> Network:
        """"""
        return self.session.query(Network).get(network_id)
11606
def get_ids(self):
        """"""
        response = api.request_networks(self)
        all_networks = []
        network_dict = {}
        for network, status in self.networks.items():
            if status['onboarded']:
                all_networks.append('{}'.format(network))
                network_dict[status['name']] = network

        # For the first onboarded network we find, grab the account id
        for resp in response['networks']:
            if str(resp['id']) in all_networks:
                self.account_id = resp['account_id']
                break

        self.network_ids = all_networks
        return network_dict
871089
def summary_stats(self, id): # pylint: disable=invalid-name,redefined-builtin
        
        schema = SummaryStatsSchema()
        resp = self.service.get(self.base+str(id)+'/', params={'stats': 'summary'})
        return self.service.decode(schema, resp)
434542
def _get_stats_from_socket(self, name):
        
        try:
            json_blob = subprocess.check_output(
                [self.config['ceph_binary'],
                 '--admin-daemon',
                 name,
                 'perf',
                 'dump',
                 ])
        except subprocess.CalledProcessError as err:
            self.log.info('Could not get stats from %s: %s',
                          name, err)
            self.log.exception('Could not get stats from %s' % name)
            return {}

        try:
            json_data = json.loads(json_blob)
        except Exception as err:
            self.log.info('Could not parse stats from %s: %s',
                          name, err)
            self.log.exception('Could not parse stats from %s' % name)
            return {}

        return json_data
900258
def get_block_statistics(cls, block_id):
        
        if not os.environ.get("BLOCKSTACK_TEST"):
            raise Exception("This method is only available in the test framework")

        global STATISTICS
        return STATISTICS.get(block_id)
895752
def get_owlsim_stats(url) -> Tuple[IcStatistic, Dict[str, IcStatistic]]:
    
    scigraph = OntologyFactory().create('scigraph:ontology')
    category_stats = {}
    categories = [enum.value for enum in HpoUpperLevel]
    sim_response = get_attribute_information_profile(url, categories=tuple(categories))

    try:
        global_stats = IcStatistic(
            mean_mean_ic=float(sim_response['system_stats']['meanMeanIC']),
            mean_sum_ic=float(sim_response['system_stats']['meanSumIC']),
            mean_cls=float(sim_response['system_stats']['meanN']),
            max_max_ic=float(sim_response['system_stats']['maxMaxIC']),
            max_sum_ic=float(sim_response['system_stats']['maxSumIC']),
            individual_count=int(sim_response['system_stats']['individuals']),
            mean_max_ic=float(sim_response['system_stats']['meanMaxIC'])
        )
        for cat_stat in sim_response['categorical_scores']:
            category_stats[cat_stat['id']] = IcStatistic(
                mean_mean_ic=float(cat_stat['system_stats']['meanMeanIC']),
                mean_sum_ic=float(cat_stat['system_stats']['meanSumIC']),
                mean_cls=float(cat_stat['system_stats']['meanN']),
                max_max_ic=float(cat_stat['system_stats']['maxMaxIC']),
                max_sum_ic=float(cat_stat['system_stats']['maxSumIC']),
                individual_count=int(cat_stat['system_stats']['individuals']),
                mean_max_ic=float(cat_stat['system_stats']['meanMaxIC']),
                descendants=scigraph.descendants(cat_stat['id'], relations=["subClassOf"])
            )

    except JSONDecodeError as json_exc:
        raise JSONDecodeError(
            "Cannot parse owlsim2 response: {}".format(json_exc.msg),
            json_exc.doc,
            json_exc.pos
        )

    return global_stats, category_stats
250521
def get_stats(self, queue):
        
        uri = "/%s/%s/stats" % (self.uri_base, utils.get_id(queue))
        resp, resp_body = self.api.method_get(uri)
        return resp_body.get("messages")
1052144
def GetStat(self):
    
    if self._stat_object is None:
      self._stat_object = self._GetStat()
    return self._stat_object
1079368
def get_stats(self, container_id):
        
        return self._docker.containers.get(container_id).stats(decode=True)
25549
def get_subnet_cidr(self, subnet_id):
        
        try:
            subnet_list = self.neutronclient.list_subnets(id=subnet_id)
            subnet_dat = subnet_list.get('subnets')[0]
            return subnet_dat.get('cidr')
        except Exception as exc:
            LOG.error("Failed to list subnet for ID %(subnet)s, "
                      "exc %(exc)s", {'subnet': subnet_id, 'exc': exc})
            return None
1179968
def _get_network(self):
        '''
        
        '''
        data = dict()
        data['interfaces'] = salt.utils.network.interfaces()
        data['subnets'] = salt.utils.network.subnets()

        return data