TuningFork_Settings

#include <tuningfork.h>

Initialization settings Zero any values that are not being used.

Summary

Public attributes

api_key
const char *
If non-null, this value overrides the api_key field in the app's tuningfork_settings.bin file.
endpoint_uri_override
const char *
A null-terminated UTF-8 string containing the endpoint that Tuning Fork will connect to for parameter, upload and debug requests.
fidelity_params_callback
Callback If set, this is called with the fidelity parameters that are downloaded.
max_num_metrics
The number of each metric that is allowed to be allocated at any given time.
persistent_cache
Cache object to be used for upload data persistence.
swappy_tracer_fn
The address of the Swappy_injectTracers function.
swappy_version
uint32_t
The version of Swappy that swappy_tracer_fn comes from.
training_fidelity_params
A serialized protobuf containing the fidelity parameters to be uploaded for training.
verbose_logging_enabled
bool
If false, sensitive information is removed from logging.

Public attributes

api_key

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

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

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

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

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

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

uint32_t TuningFork_Settings::swappy_version

The version of Swappy that swappy_tracer_fn comes from.

training_fidelity_params

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

bool TuningFork_Settings::verbose_logging_enabled

If false, sensitive information is removed from logging.

Default is false.