Health Events
For more information about health events read here
Health events are a special type of optional events that will collect information about the device and general performance metrics.
Enabling health events such as SDK Init Event and Performance Event will offer more insight.
Hardware Tracking
While not being a separate event, enabling hardware tracking will attach additional information about the device to health events.
name | description |
---|---|
cpu_model | name of the cpu |
hardware | device's chipset |
cpu_num_cores | total number of physical cpu cores |
resolution | resolution of the device as a string, e.g: "WidthXHeight" |
memory_sys_total* | total system memory expressed in MB |
memory_sys_used* | memory used by the whole system at the time of the reading, expressed in MB |
memory_app_used* | memory used by the app alone at the time of the reading, expressed in MB |
(*) Require memory tracking to be enabled
SDK Init Event
SDK Init event - event that is sent every time the app is starting and loading into memory for the first time, not when users return and resume an in-memory game.
You can enable the SDK Init event using the following API call:
gameanalytics::GameAnalytics::enableSDKInitEvent(true);
App Boot Time
The SDK init event will also track the app boot time, this is defined as the time between the start of the game (e.g: the process) to the moment that GameAnalytics is initialized (e.g: GameAnalytics.Initialize(gameKey, secretKey)
).
To better measure start-up times you can initialize GameAnalytics after the game has loaded its resources.
Performance Event
If enabled, the performance event will collect performance metrics during the playtime session.
This event will be automatically sent at the end of the session.
FPS Tracking
If enabled, GameAnalytics will automatically record the averaged FPS values every second across the play session. The values will be sent at the end of every session as part of the Performance event.
name | description |
---|---|
fps_data_table | GameAnalytics will record the averaged FPS value every second and aggregate the values into buckets from 0 to 120 each correspoding to an FPS value (e.g: bucket #60 contains the number of 60fps samples) |
To enable FPS tracking use the following API call:
// Declare a custom FPS tracker
std::function<float()> customFpsTracker = []() -> float {
// Your logic to calculate and return the current FPS
return 60.0f;
};
// this is off by default
gameanalytics::GameAnalytics::enableFPSHistogram(fpsTracker, true);
Memory Tracking
If enabled, GameAnalytics will automatically record memory consumptionacross the play session. The values will be sent at the end of every session as part of the Performance event.
Every 5 seconds, GameAnalytics will query the total memory used by the device and total memory used by the application alone. Those will be stored as percentages of total device memory.
name | description |
---|---|
mem_sys_data_table | memory usage across the whole system expressed in percents of the total device memory |
memory_app_data_table | memory usage of the application alone expressed in percents of the total device memory |
To enable memory tracking use the following API call:
gameanalytics::GameAnalytics::enableMemoryHistogram(true);