mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-20 21:23:23 +00:00
* feat(test): use host-aware local full-suite defaults * fix(test): remove undefined local profile host info
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
export type VitestHostInfo = {
|
|
cpuCount?: number;
|
|
loadAverage1m?: number;
|
|
totalMemoryBytes?: number;
|
|
};
|
|
|
|
export type LocalVitestScheduling = {
|
|
maxWorkers: number;
|
|
fileParallelism: boolean;
|
|
throttledBySystem: boolean;
|
|
};
|
|
|
|
export const DEFAULT_LOCAL_FULL_SUITE_PARALLELISM: number;
|
|
export const LARGE_LOCAL_FULL_SUITE_PARALLELISM: number;
|
|
export const DEFAULT_LOCAL_FULL_SUITE_VITEST_WORKERS: number;
|
|
export const LARGE_LOCAL_FULL_SUITE_VITEST_WORKERS: number;
|
|
|
|
export function isCiLikeEnv(env?: Record<string, string | undefined>): boolean;
|
|
export function detectVitestHostInfo(): Required<VitestHostInfo>;
|
|
export function resolveLocalVitestMaxWorkers(
|
|
env?: Record<string, string | undefined>,
|
|
system?: VitestHostInfo,
|
|
pool?: "forks" | "threads",
|
|
): number;
|
|
export function resolveLocalVitestScheduling(
|
|
env?: Record<string, string | undefined>,
|
|
system?: VitestHostInfo,
|
|
pool?: "forks" | "threads",
|
|
): LocalVitestScheduling;
|
|
export function shouldUseLargeLocalFullSuiteProfile(
|
|
env?: Record<string, string | undefined>,
|
|
system?: VitestHostInfo,
|
|
): boolean;
|
|
export function resolveLocalFullSuiteProfile(
|
|
env?: Record<string, string | undefined>,
|
|
system?: VitestHostInfo,
|
|
): {
|
|
shardParallelism: number;
|
|
vitestMaxWorkers: number;
|
|
};
|