透過集合功能整理內容
你可以依據偏好儲存及分類內容。
TFSettings
#include <tuningfork.h>
初始化設定:將任何未使用的值歸零。
摘要
公開屬性
endpoint_uri_override
const char * TFSettings::endpoint_uri_override
包含端點的空終止字串,Tuning Fork 將為參數連結該端點,並上傳及偵錯要求。
這麽做會覆寫設定 proto 中的 base_uri 值,且僅供偵錯用。
fidelity_params_callback
ProtoCallback TFSettings::fidelity_params_callback
如果設定了回呼,則會使用已下載的擬真度參數來進行呼叫。
如未設定,則必須自行呼叫 TuningFork_getFidelityParameters。
persistent_cache
const TFCache * TFSettings::persistent_cache
用於上傳資料持續性的快取物件。
如未設定,資料會保留在 /data/local/tmp/tuningfork
swappy_tracer_fn
SwappyTracerFn TFSettings::swappy_tracer_fn
Swappy_injectTracers 函式的地址。
如未設定,則必須自行呼叫 TuningFork_tick。如果已設定,系統將自動記錄 4 個檢測金鑰的遙測資料。
swappy_version
uint32_t TFSettings::swappy_version
swappy_tracer_fn 源自的 Swappy 版本。
training_fidelity_params
const CProtobufSerialization * TFSettings::training_fidelity_params
序列化的 protobuf,其中包含為了訓練而上傳的擬真度參數。
如未使用訓練模式,請將這個參數設為 nullptr。請注意,在這些參數已存在、下載不成功且沒有已儲存參數的情況下,這些參數會取代從 APK 載入的預設參數。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[],[],null,["# TFSettings Struct Reference\n\nTFSettings\n==========\n\n`#include \u003ctuningfork.h\u003e`\n\nInitialization settings Zero any values that are not being used.\n\nSummary\n-------\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [endpoint_uri_override](#struct_t_f_settings_1a88e9ace6b6d25dfdf6ee281f1840ace3) | `const char *` A null-terminated string containing the endpoint that Tuning Fork will connect to for parameter, upload and debug requests. |\n| [fidelity_params_callback](#struct_t_f_settings_1a89cd30d7f2359b54c20ac53aca6aa629) | [ProtoCallback](/games/sdk/reference/performance-tuner/custom-engine/group/tuningfork#group__tuningfork_1gaf780faded2692da73f8d7ee37499d171) Callback If set, this is called with the fidelity parameters that are downloaded. |\n| [persistent_cache](#struct_t_f_settings_1a25e55876c9296aaec34b4dbb8772ceba) | `const `[TFCache](/games/sdk/reference/performance-tuner/custom-engine/struct/t-f-cache#struct_t_f_cache)` *` Cache object to be used for upload data persistence. |\n| [swappy_tracer_fn](#struct_t_f_settings_1a3ca27ab14efce1c40d4b70f8e567da33) | [SwappyTracerFn](/games/sdk/reference/performance-tuner/custom-engine/group/tuningfork#group__tuningfork_1ga43b1819af457676a72f228c08068fed4) The address of the Swappy_injectTracers function. |\n| [swappy_version](#struct_t_f_settings_1a5c2d98b44ddf8084bc7ef9eff516d451) | `uint32_t` The version of Swappy that swappy_tracer_fn comes from. |\n| [training_fidelity_params](#struct_t_f_settings_1a3ab649a2ec035694d4b035b742d56dd9) | `const `[CProtobufSerialization](/games/sdk/reference/performance-tuner/custom-engine/struct/c-protobuf-serialization#struct_c_protobuf_serialization)` *` A serialized protobuf containing the fidelity parameters to be uploaded for training. |\n\nPublic attributes\n-----------------\n\n### endpoint_uri_override\n\n```gdscript\nconst char * TFSettings::endpoint_uri_override\n``` \nA null-terminated string containing the endpoint that Tuning Fork will connect to for parameter, upload and debug requests.\n\nThis overrides the value in base_uri in the settings proto and is intended for debugging purposes only. \n\n### fidelity_params_callback\n\n```scdoc\nProtoCallback TFSettings::fidelity_params_callback\n``` \nCallback If set, this is called with the fidelity parameters that are downloaded.\n\nIf unset, you need to call TuningFork_getFidelityParameters yourself. \n\n### persistent_cache\n\n```gdscript\nconst TFCache * TFSettings::persistent_cache\n``` \nCache object to be used for upload data persistence.\n\nIf unset, data is persisted to /data/local/tmp/tuningfork \n\n### swappy_tracer_fn\n\n```scdoc\nSwappyTracerFn TFSettings::swappy_tracer_fn\n``` \nThe address of the Swappy_injectTracers function.\n\nIf this is unset, you need to call TuningFork_tick yourself. If it is set, telemetry for 4 instrument keys is automatically recorded. \n\n### swappy_version\n\n```scdoc\nuint32_t TFSettings::swappy_version\n``` \nThe version of Swappy that swappy_tracer_fn comes from. \n\n### training_fidelity_params\n\n```gdscript\nconst CProtobufSerialization * TFSettings::training_fidelity_params\n``` \nA serialized protobuf containing the fidelity parameters to be uploaded for training.\n\nSet this to nullptr if you are not using training mode. Note that these are used instead of the default parameters loaded from the APK, if they are present and there are neither a successful download nor saved parameters."]]