Stay organized with collections
Save and categorize content based on your preferences.
The following sections outline advanced usage topics not needed for normal
operation of the library.
Other supported tracers
Tuning Fork supports multiple tracers. Tracers with the following instrument
keys are supported:
Time between frame starts (called PACED_FRAME_TIME)
CPU Time: Time between the start of the frame and the end of the CPU work
for the frame (called CPU_TIME)
GPU Time: Time for the previous frame to be handled by the GPU (called
GPU_TIME)
The raw frame time, defined as the maximum of the CPU and GPU time (called
RAW_FRAME_TIME). The difference between this option and PACED_FRAME_TIME
is that this option does not include any wait time included by Swappy or
VSync.
You can find these instrument keys in the
reference documentation.
Some of these keys are used automatically when you enable the Android Frame
Pacing library, but if you are not enabling this library, you should use them
explicitly.
If you pass fidelity_params_callback to TuningFork_init in settings or the
library is in scaled mode, you do not need to call this function.
This function contacts a server to retrieve fidelity parameters. It blocks until
one of the following occurs:
Fidelity parameters are retrieved, with a return value of TFERROR_OK and
returnedParams store the parameters. In this case, all subsequent tick
data is associated with returnedParams.
A number of milliseconds equal to timeout_ms passes, with a return value
of TFERROR_TIMEOUT. In this case, all subsequent tick data is associated
with defaultFidelityParams.
You must call TuningFork_init() before this function, and you must call it on
a separate thread from the main thread (see
TuningFork_startFidelityParamDownloadThread()
for a utility function that does this for you). You can call this function
again, for example at level-loading time, to retrieve fidelity parameters from
the server again. This allows you to dynamically update parameters rather than
having to reload them only at start-up. If new fidelity parameters are
downloaded or a new default is used, all previous tick data is submitted.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-26 UTC."],[],[],null,["The following sections outline advanced usage topics not needed for normal\noperation of the library.\n\nOther supported tracers\n\nTuning Fork supports multiple tracers. Tracers with the following instrument\nkeys are supported:\n\n- Time between frame starts (called `PACED_FRAME_TIME`)\n- CPU Time: Time between the start of the frame and the end of the CPU work for the frame (called `CPU_TIME`)\n- GPU Time: Time for the previous frame to be handled by the GPU (called `GPU_TIME`)\n- The raw frame time, defined as the maximum of the CPU and GPU time (called `RAW_FRAME_TIME`). The difference between this option and `PACED_FRAME_TIME` is that this option does not include any wait time included by Swappy or VSync.\n\nYou can find these instrument keys in the\n[reference documentation](/games/sdk/reference/performance-tuner/custom-engine).\nSome of these keys are used automatically when you enable the Android Frame\nPacing library, but if you are not enabling this library, you should use them\nexplicitly.\n\nGet fidelity parameters\n\n[`TFErrorCode TuningFork_getFidelityParameters(const CProtobufSerialization*\ndefaultParams, CProtobufSerialization* params, uint32_t\ntimeout_ms);`](/games/sdk/reference/performance-tuner/custom-engine/group/tuningfork#tuningfork_getfidelityparameters)\n\nIf you pass `fidelity_params_callback` to `TuningFork_init` in settings or the\nlibrary is in scaled mode, you do not need to call this function.\n\nThis function contacts a server to retrieve fidelity parameters. It blocks until\none of the following occurs:\n\n- Fidelity parameters are retrieved, with a return value of `TFERROR_OK` and `returnedParams` store the parameters. In this case, all subsequent tick data is associated with `returnedParams`.\n- A number of milliseconds equal to `timeout_ms` passes, with a return value of `TFERROR_TIMEOUT`. In this case, all subsequent tick data is associated with `defaultFidelityParams`.\n\nYou must call `TuningFork_init()` before this function, and you must call it on\na separate thread from the main thread (see\n[`TuningFork_startFidelityParamDownloadThread()`](/games/sdk/reference/performance-tuner/custom-engine/group/tuningfork-extra#tuningfork_startfidelityparamdownloadthread)\nfor a utility function that does this for you). You can call this function\nagain, for example at level-loading time, to retrieve fidelity parameters from\nthe server again. This allows you to dynamically update parameters rather than\nhaving to reload them only at start-up. If new fidelity parameters are\ndownloaded or a new default is used, all previous tick data is submitted."]]