Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Le sezioni seguenti descrivono argomenti di utilizzo avanzato non necessari per il normale
funzionamento della libreria.
Altri tracer supportati
Tuning Fork supporta più tracer. Sono supportati i tracer con le seguenti chiavi di strumentazione:
Tempo tra l'inizio dei frame (chiamato PACED_FRAME_TIME)
Tempo CPU: tempo che intercorre tra l'inizio del frame e la fine dell'attività della CPU
per il frame (chiamato CPU_TIME)
Tempo GPU: tempo necessario per la gestione del frame precedente da parte della GPU (chiamato
GPU_TIME)
Il tempo di frame grezzo, definito come il massimo tra il tempo della CPU e della GPU (chiamato
RAW_FRAME_TIME). La differenza tra questa opzione e PACED_FRAME_TIME
è che questa opzione non include alcun tempo di attesa incluso da Swappy o
VSync.
Puoi trovare queste chiavi dello strumento nella
documentazione di riferimento.
Alcune di queste chiavi vengono utilizzate automaticamente quando abiliti la libreria Android Frame
Pacing, ma se non la abiliti, devi utilizzarle
esplicitamente.
Se passi fidelity_params_callback a TuningFork_init nelle impostazioni o se la
libreria è in modalità scalata, non devi chiamare questa funzione.
Questa funzione contatta un server per recuperare i parametri di fedeltà. Si blocca finché
non si verifica uno dei seguenti eventi:
I parametri di fedeltà vengono recuperati, con un valore restituito di TFERROR_OK e
returnedParams memorizza i parametri. In questo caso, tutti i dati
successivi sono associati a returnedParams.
Un numero di millisecondi pari a timeout_ms viene superato, con un valore restituito
di TFERROR_TIMEOUT. In questo caso, tutti i dati tick successivi sono associati
a defaultFidelityParams.
Devi chiamare TuningFork_init() prima di questa funzione e devi chiamarla su
un thread separato dal thread principale (vedi
TuningFork_startFidelityParamDownloadThread()
per una funzione di utilità che esegue questa operazione per te). Puoi chiamare di nuovo questa funzione, ad esempio al momento del caricamento del livello, per recuperare di nuovo i parametri di fedeltà dal server. In questo modo puoi aggiornare dinamicamente i parametri anziché doverli ricaricare solo all'avvio. Se vengono scaricati nuovi parametri di fedeltà o viene utilizzato un nuovo valore predefinito, vengono inviati tutti i dati tick precedenti.
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-08-26 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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."]]