Add experiment logs to the monitoring page

This commit is contained in:
Twirre
2026-01-28 10:15:58 +00:00
committed by Björn Otgaar
parent 78901ee25b
commit 835de03a29
25 changed files with 619 additions and 124 deletions

3
src/utils/capitalize.ts Normal file
View File

@@ -0,0 +1,3 @@
export default function (s: string) {
return s.charAt(0).toUpperCase() + s.slice(1);
}

View File

@@ -0,0 +1,7 @@
export default async function <T>(promise: Promise<T>, minDelayMs: number): Promise<T> {
const [result] = await Promise.all([
promise,
new Promise(resolve => setTimeout(resolve, minDelayMs))
]);
return result;
}

View File

@@ -4,7 +4,7 @@ export type PriorityFilterPredicate<T> = {
}
/**
* Applies a list of priority predicates to an element. For all predicates that don't return null, if the ones with the highest level return true, then this function returns true.
* Applies a list of priority predicates to an element. For all predicates that don't return null, if the ones with the highest level return true, then this function returns true. Or conversely, if the one with the highest level returns false, then this function returns false.
* @param element The element to apply the predicates to.
* @param predicates The list of predicates to apply.
*/