Add experiment logs to the monitoring page
This commit is contained in:
3
src/utils/capitalize.ts
Normal file
3
src/utils/capitalize.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function (s: string) {
|
||||
return s.charAt(0).toUpperCase() + s.slice(1);
|
||||
}
|
||||
7
src/utils/delayedResolve.ts
Normal file
7
src/utils/delayedResolve.ts
Normal 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;
|
||||
}
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user