# TuningFork_Settings

`#include <tuningfork.h>`

Initialization settings Zero any values that are not being used.

## Summary

| ### Public attributes ||
|---|---|
| `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-settings#struct_tuning_fork___settings_1a28c92f57bbc38c25b2615f63b6ec309b` | `const char *` If non-null, this value overrides the api_key field in the app's tuningfork_settings.bin file. |
| `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-settings#struct_tuning_fork___settings_1a06e586714307a347736b14a54cfcf906` | `const char *` A null-terminated UTF-8 string containing the endpoint that Tuning Fork will connect to for parameter, upload and debug requests. |
| `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-settings#struct_tuning_fork___settings_1a5b60ba7d9bb38b2eefe0332dce919037` | `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/group/tuningfork#group__tuningfork_1ga1a8f1743f180343c029abb264f9ad20b` Callback If set, this is called with the fidelity parameters that are downloaded. |
| `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-settings#struct_tuning_fork___settings_1a5bbca8f21012e21d3b362801f7eba28a` | `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-metric-limits#struct_tuning_fork___metric_limits` The number of each metric that is allowed to be allocated at any given time. |
| `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-settings#struct_tuning_fork___settings_1a4accf240624211e17957ed5d7d318441` | `const https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-cache#struct_tuning_fork___cache *` Cache object to be used for upload data persistence. |
| `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-settings#struct_tuning_fork___settings_1a075dd6f093d9e6f41e07964171e09547` | `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/group/tuningfork#group__tuningfork_1ga226ceba1a1596ee68717ac2aaedad5ba` The address of the Swappy_injectTracers function. |
| `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-settings#struct_tuning_fork___settings_1a072586921d648c23d280a8aa77bf4889` | `uint32_t` The version of Swappy that swappy_tracer_fn comes from. |
| `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-settings#struct_tuning_fork___settings_1a764406c0611ffc2bdb9fafae6a8e66c7` | `const https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-c-protobuf-serialization#struct_tuning_fork___c_protobuf_serialization *` A serialized protobuf containing the fidelity parameters to be uploaded for training. |
| `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-settings#struct_tuning_fork___settings_1a9eb6af1db4b6bbcb1fa6b3c1c4224ff5` | `bool` If false, sensitive information is removed from logging. |

## Public attributes

### api_key

```gdscript
const char * TuningFork_Settings::api_key
```
If non-null, this value overrides the api_key field in the app's tuningfork_settings.bin file.

See tuningfork.proto for more information.

### endpoint_uri_override

```gdscript
const char * TuningFork_Settings::endpoint_uri_override
```
A null-terminated UTF-8 string containing the endpoint that Tuning Fork will connect to for parameter, upload and debug requests.

This overrides the value in base_uri in the settings proto and is intended for debugging purposes only.

### fidelity_params_callback

```scdoc
TuningFork_FidelityParamsCallback TuningFork_Settings::fidelity_params_callback
```
Callback If set, this is called with the fidelity parameters that are downloaded.

If null, you need to call TuningFork_getFidelityParameters yourself.

### max_num_metrics

```scdoc
TuningFork_MetricLimits TuningFork_Settings::max_num_metrics
```
The number of each metric that is allowed to be allocated at any given time.

If any element is zero, the default for that metric type will be used. Memory for all metrics is allocated up-front at initialization. When all metrics of a given type are allocated, further requested metrics will not be added and data will be lost.

### persistent_cache

```gdscript
const TuningFork_Cache * TuningFork_Settings::persistent_cache
```
Cache object to be used for upload data persistence.

If null, data is persisted to /data/local/tmp/tuningfork

### swappy_tracer_fn

```scdoc
SwappyTracerFn TuningFork_Settings::swappy_tracer_fn
```
The address of the Swappy_injectTracers function.

If this is null, you need to call TuningFork_tick yourself. If it is set, telemetry for 4 instrument keys is automatically recorded.

### swappy_version

```scdoc
uint32_t TuningFork_Settings::swappy_version
```
The version of Swappy that swappy_tracer_fn comes from.

### training_fidelity_params

```gdscript
const TuningFork_CProtobufSerialization * TuningFork_Settings::training_fidelity_params
```
A serialized protobuf containing the fidelity parameters to be uploaded for training.

Set this to nullptr if you are not using training mode. In training mode, these parameters are taken to be the parameters used within the game and they are used to help suggest parameter changes for different devices. Note that these override the default parameters loaded from the APK at startup.

### verbose_logging_enabled

```scdoc
bool TuningFork_Settings::verbose_logging_enabled
```
If false, sensitive information is removed from logging.

Default is false.