TuningProfile

data class TuningProfile(val algorithmId: AlgorithmId, val profileId: String, val values: Map<String, Double> = emptyMap(), val flags: Map<String, Boolean> = emptyMap())

A named set of knob values for one algorithm.

This is how "the current app's algorithm" and "the other app's algorithm" stop being two codebases and become two rows of numbers that can be diffed and A/B'd.

Constructors

Link copied to clipboard
constructor(algorithmId: AlgorithmId, profileId: String, values: Map<String, Double> = emptyMap(), flags: Map<String, Boolean> = emptyMap())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

e.g. "mileway.v1", "prod.reference", "sdk.passthrough"

Link copied to clipboard

Functions

Link copied to clipboard
fun b(name: String, default: Boolean): Boolean
Link copied to clipboard
fun d(spec: KnobSpec): Double

Read a knob, falling back to its declared default and clamping into its declared range.

Link copied to clipboard
fun with(name: String, value: Boolean): TuningProfile
fun with(name: String, value: Double): TuningProfile