mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-20 16:47:59 +02:00
test(metrics): derive oversized fixture from scan cap
Export the internal scan budget for regression tests and size the oversized-line fixture as exactly two bounded passes.
This commit is contained in:
@@ -500,6 +500,7 @@ module.exports = {
|
||||
COST_SNAPSHOT_SCHEMA_VERSION,
|
||||
COST_SNAPSHOT_DIRECTORY,
|
||||
COST_LOG_FILENAME,
|
||||
MAX_SCAN_BYTES,
|
||||
getCostSnapshotPath,
|
||||
isValidCostRow,
|
||||
chooseNewerCumulativeRow,
|
||||
|
||||
@@ -8,6 +8,7 @@ const path = require('path');
|
||||
const {
|
||||
appendSessionCostRow,
|
||||
getCostSnapshotPath,
|
||||
MAX_SCAN_BYTES,
|
||||
maybePruneSessionCostSnapshots,
|
||||
readSessionCostSnapshot,
|
||||
refreshSessionCostSnapshot,
|
||||
@@ -199,7 +200,7 @@ try {
|
||||
if (test('bounds oversized unterminated rows and caches the discarded prefix', () => {
|
||||
const caseRoot = path.join(root, 'oversized-line');
|
||||
fs.mkdirSync(caseRoot, { recursive: true });
|
||||
const oversizedBytes = 32 * 1024 * 1024;
|
||||
const oversizedBytes = 2 * MAX_SCAN_BYTES;
|
||||
fs.writeFileSync(
|
||||
path.join(caseRoot, 'costs.jsonl'),
|
||||
Buffer.alloc(oversizedBytes, 0x78)
|
||||
|
||||
Reference in New Issue
Block a user