data ab
Namespace of the experiment functions.
Example:
use std.ab { ab }
fn pick(q: str) -> str io {
match ab.variant("search v2") {
"b" => "new:{q}"
_ => "old:{q}"
}
}
fn main() io {
print(pick("x"))
}Output
old:x
pub(api) data abThread safety. safe to call from any task; the answer depends only on the request the task is serving.
Since. 1.0.0-beta
Methods
variant | (name: str) -> str ioThe name of the variant of experiment name for the calling request ("a" / "b" as declared in test ab). |
Defined in: std/ab/ab.oxl:63