Upravit

Sdílet prostřednictvím


Statistics Meters

Statistics meters are divided into three categories.

Statistics Reads

Whether ranked or unranked, reading statistics on an entity results in one tick of the Statistics Read meter. This tick occurs both when requesting one or several stats for an entity.

Here's the list of APIs that tick this meter:

API Name API Reference
GetStatistics Get Statistics
GetStatisticsForEntities Get Statistics For Entities

Statistics Writes

Whether ranked or unranked, updating statistics on an entity results in one tick of the Statistics Write meter. This tick occurs both when updating 1 or several (batched) stats for an entity.

When ranked on a leaderboard, Statistic Writes results in ticks for the Leaderboard Write meter (in addition to the Statistic Writes meter). The number of ticks is dependent on the number of ranked stats in the request. Where N is the number of stat definitions in a request (which could be one) and M is the number of ranked stats in that set, the Leaderboard Write meter ticks M times.

Here's the list of APIs that tick this meter:

API Name API Reference
UpdateStatistics Update Statistics

Transactional Writes

The Transactional Write meter is a different variant of the Statistics Writes meter, it operates under the same conditions but adds the feature of handling requests as transactions, ensuring each request executes only once.

This meter is limited to this API and requires a special parameter for a client Transaction Id. When you provide this parameter, the Transactional Write meter is activated.

API Name API Reference
UpdateStatistics Update Statistics

Statistics Storage

This meter keeps track on how much statistics data is stored in the service.

For each entity statistic, the storage consumed per version of the statistic is computed as the sum of the following elements:

  • Scores: Length of the list of scores multiplied by sizeof(long).
  • Metadata: Length of the field.
  • Timestamp: sizeof(long).
  • Length of the entity id.

See Also