> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PartyLocalEndpoint::GetEndpointStatistics

> Gets one or more statistic counter values for the specified target endpoints.

Gets one or more statistic counter values for the specified target endpoints.

## Syntax

```cpp theme={null}
PartyError GetEndpointStatistics(  
    uint32_t targetEndpointCount,  
    PartyEndpointArray targetEndpoints,  
    uint32_t statisticCount,  
    const PartyEndpointStatistic* statisticTypes,  
    uint64_t* statisticValues  
)  
```

### Parameters

**`targetEndpointCount`**   uint32\_t

The number of target endpoints in the `targetEndpoints` array. May be 0 to retrieve statistics for all endpoints currently in the network, including this local one.

**`targetEndpoints`**   [PartyEndpointArray](/services/playfab/multiplayer/networking/reference/typedefs)\
*input array of size `targetEndpointCount`*

The `targetEndpointCount` entry array of target PartyEndpoint object pointers for which statistics should be retrieved. This is ignored when `targetEndpointCount` is zero.

**`statisticCount`**   uint32\_t

The number of statistics in the input `statisticTypes` array and to be written in the `statisticValues` output array. This must be at least 1.

**`statisticTypes`**   [PartyEndpointStatistic\*](/services/playfab/multiplayer/networking/reference/enums/partyendpointstatistic)\
*input array of size `statisticCount`*

The `statisticCount` entry input array of unique PartyEndpointStatistic types to retrieve.

**`statisticValues`**   uint64\_t\*\
*output array of size `statisticCount`*

The `statisticCount` entry output array where the statistic values should be written. Each statistic value will be written at the same entry index corresponding to where the requested PartyEndpointStatistic appears in the `statisticTypes` input array.

### Return value

PartyError

`c_partyErrorSuccess` if retrieving the endpoint statistics succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via [PartyManager::GetErrorMessage()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage).

## Remarks

This method is used to retrieve performance counters, queue lengths, historical usage metrics, or other statistical information recorded between this local endpoint and a target endpoint. <br /><br /> Alternatively, multiple target endpoints can be provided, or a zero-entry array to retrieve statistics for all target endpoints currently in the network, including this local one. If multiple target endpoints are requested, then the values returned are the combined statistics for those endpoints. The particular method used to combine multiple endpoint statistics into a single value depends on and is described by the specific PartyEndpointStatistic type.   <br /><br /> A given PartyEndpointStatistic type may appear in any order in the `statisticTypes` array, but must not be specified more than once. Each corresponding statistic value will be written to the `statisticValues` array in the same order.   <br /><br /> The returned statistic values are always the most current ones available. There is no guarantee they will report the same value from one GetEndpointStatistics() call to the next, even if there were no intervening calls to [PartyManager::StartProcessingStateChanges()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_startprocessingstatechanges) or [PartyManager::FinishProcessingStateChanges()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_finishprocessingstatechanges).

## Requirements

**Header:** Party.h

## See also

[PartyLocalEndpoint](/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/partylocalendpoint)\
[PartyEndpointStatistic](/services/playfab/multiplayer/networking/reference/enums/partyendpointstatistic)\
[PartyNetwork::GetNetworkStatistics](/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_getnetworkstatistics)


## Related topics

- [PartyEndpointStatistic](/services/playfab/multiplayer/networking/reference/enums/partyendpointstatistic.md)
- [PartyLocalEndpoint::SendMessage](/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md)
- [PartyNetworkStatistic](/services/playfab/multiplayer/networking/reference/enums/partynetworkstatistic.md)
- [PartyNetwork::GetNetworkStatistics](/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_getnetworkstatistics.md)
- [PartyDirectPeerConnectivityOptions](/services/playfab/multiplayer/networking/reference/enums/partydirectpeerconnectivityoptions.md)
