fix: update a/b tests to run
This commit is contained in:
parent
b7ecd1e4a3
commit
73cb64aad1
1 changed files with 6 additions and 5 deletions
|
|
@ -18,10 +18,7 @@ pub enum ABTest {
|
||||||
TrendsVideoTab = 4,
|
TrendsVideoTab = 4,
|
||||||
}
|
}
|
||||||
|
|
||||||
const TESTS_TO_RUN: [ABTest; 2] = [
|
const TESTS_TO_RUN: [ABTest; 1] = [ABTest::TrendsVideoTab];
|
||||||
ABTest::AttributedTextDescription,
|
|
||||||
ABTest::ChannelHandlesInSearchResults,
|
|
||||||
];
|
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
pub struct ABTestRes {
|
pub struct ABTestRes {
|
||||||
|
|
@ -29,6 +26,8 @@ pub struct ABTestRes {
|
||||||
name: ABTest,
|
name: ABTest,
|
||||||
tests: usize,
|
tests: usize,
|
||||||
occurrences: usize,
|
occurrences: usize,
|
||||||
|
vd_present: Option<String>,
|
||||||
|
vd_absent: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
|
|
@ -124,12 +123,14 @@ pub async fn run_all_tests(n: usize, concurrency: usize) -> Vec<ABTestRes> {
|
||||||
let mut results = Vec::new();
|
let mut results = Vec::new();
|
||||||
|
|
||||||
for ab in TESTS_TO_RUN {
|
for ab in TESTS_TO_RUN {
|
||||||
let (occurrences, _, _) = run_test(ab, n, concurrency).await;
|
let (occurrences, vd_present, vd_absent) = run_test(ab, n, concurrency).await;
|
||||||
results.push(ABTestRes {
|
results.push(ABTestRes {
|
||||||
id: ab as u16,
|
id: ab as u16,
|
||||||
name: ab,
|
name: ab,
|
||||||
tests: n,
|
tests: n,
|
||||||
occurrences,
|
occurrences,
|
||||||
|
vd_present,
|
||||||
|
vd_absent,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
results
|
results
|
||||||
|
|
|
||||||
Reference in a new issue