/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/harness/benchmark/scale.mjs
15 строк
655 B
Alexander Akait
test: enlarge memory-benchmark fixtures in memory mode only to stabilize CodSpeed (#21509)
26 июл 2026, 15:55
Не верифицирован
26 июл 2026, 15:55
9d01716
Код
Авторство
О чём код?
import { getCodspeedRunnerMode } from "@codspeed/core"; // CodSpeed memory mode reports peak net OS-allocator bytes in the window, which is // quantization-noisy on a sub-MB graph; enlarge only there so simulation/walltime // benches (already deterministic) stay small and fast. const MEMORY_MODE = getCodspeedRunnerMode() === "memory"; /** * @param {number} normal item/module count for non-memory runner modes * @param {number} memory item/module count for CodSpeed memory mode * @returns {number} count to generate for the active runner mode */ export default function memoryScaledCount(normal, memory) { return MEMORY_MODE ? memory : normal; }