codeflash 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/runtime/loop-runner.js +5 -1
package/package.json
CHANGED
package/runtime/loop-runner.js
CHANGED
|
@@ -32,7 +32,11 @@ const internalRequire = createRequire(jestRunnerPath);
|
|
|
32
32
|
const runTest = internalRequire('./runTest').default;
|
|
33
33
|
|
|
34
34
|
// Configuration
|
|
35
|
-
const
|
|
35
|
+
const PERF_LOOP_COUNT = parseInt(process.env.CODEFLASH_PERF_LOOP_COUNT || '10000', 10);
|
|
36
|
+
const PERF_BATCH_SIZE = parseInt(process.env.CODEFLASH_PERF_BATCH_SIZE || '10', 10);
|
|
37
|
+
// MAX_BATCHES = how many batches needed to reach PERF_LOOP_COUNT iterations
|
|
38
|
+
// Add 1 to handle any rounding, but cap at PERF_LOOP_COUNT to avoid excessive batches
|
|
39
|
+
const MAX_BATCHES = Math.min(Math.ceil(PERF_LOOP_COUNT / PERF_BATCH_SIZE) + 1, PERF_LOOP_COUNT);
|
|
36
40
|
const TARGET_DURATION_MS = parseInt(process.env.CODEFLASH_PERF_TARGET_DURATION_MS || '10000', 10);
|
|
37
41
|
const MIN_BATCHES = parseInt(process.env.CODEFLASH_PERF_MIN_LOOPS || '5', 10);
|
|
38
42
|
|