TFSettings

#include <tuningfork.h>

Initialization settings Zero any values that are not being used.

Summary

Public attributes

endpoint_uri_override
const char *
A null-terminated 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.
persistent_cache
const TFCache *
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.

Public attributes

endpoint_uri_override

const char * TFSettings::endpoint_uri_override

A null-terminated 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

ProtoCallback TFSettings::fidelity_params_callback

Callback If set, this is called with the fidelity parameters that are downloaded.

If unset, you need to call TuningFork_getFidelityParameters yourself.

persistent_cache

const TFCache * TFSettings::persistent_cache

Cache object to be used for upload data persistence.

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

swappy_tracer_fn

SwappyTracerFn TFSettings::swappy_tracer_fn

The address of the Swappy_injectTracers function.

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

swappy_version

uint32_t TFSettings::swappy_version

The version of Swappy that swappy_tracer_fn comes from.

training_fidelity_params

const CProtobufSerialization * TFSettings::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. 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.