> ## 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.

# 在遊戲中顯示佇列統計資料

> 查詢並顯示 PlayFab Matchmaking 佇列統計資料，例如票證數目和等候時間，在玩家搜尋比賽時提供意見反應。

遊戲有時可能想要顯示其佇列的活躍程度，以設定使用者對等候時間的預期。遊戲可以擷取這些統計資料並直接向使用者顯示，或從伺服器擷取這些統計資料，依需要顯示或收集近似的遙測資料。本教學課程說明從配對擷取這些統計資料的步驟。

## 設定佇列

首先，決定是否應將佇列設定為允許使用者擷取統計資料。伺服器一律可以擷取每個佇列的統計資料。只有在佇列設定中勾選了**顯示正在配對的玩家人數**和/或**顯示配對時間統計資料**設定時，使用者才能擷取統計資料。

具有此設定的佇列範例，請參閱[配對設定範例](/zh-TW/services/playfab/multiplayer/matchmaking/config-examples#enabling-statistics)。

## 擷取統計資料

呼叫 [GetQueueStatistics
](xref:titleid.playfabapi.com.multiplayer.matchmaking.getqueuestatistics) API 以擷取統計資料。這些值會隨時間彙總和更新。因此，`GetQueueStatistics` API 只應間歇呼叫。它並非用來即時追蹤佇列的統計資料。


## Related topics

- [設定配對佇列](/zh-TW/services/playfab/multiplayer/matchmaking/config-queues.md)
- [配對](/zh-TW/services/playfab/multiplayer/matchmaking/index.md)
- [使用玩家統計資料](/zh-TW/services/playfab/community/leaderboards/tournaments-leaderboards/using-player-statistics.md)
- [取得佇列統計資料](/zh-TW/services/playfab/api-references/rest/multiplayer/matchmaking/get-queue-statistics.md)
- [精選統計資料概觀](/zh-TW/services/xbox-services/player-data/stats-leaderboards/featured-stats/live-featuredstats-overview.md)
