n8n/packages/testing/performance/benchmarks/expression-engine/patterns-legacy.bench.ts
Iván Ovejero 5ee0e842b8
Some checks are pending
CI: Master (Build, Test, Lint) / Build for Github Cache (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (22.x) (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (24.13.1) (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (25.x) (push) Waiting to run
CI: Master (Build, Test, Lint) / Lint (push) Waiting to run
CI: Master (Build, Test, Lint) / Performance (push) Waiting to run
CI: Master (Build, Test, Lint) / Notify Slack on failure (push) Blocked by required conditions
feat(core): Add isolate pooling for VM expression engine (#27573)
2026-03-31 14:54:11 +00:00

36 lines
792 B
TypeScript

/**
* Tier 1: Legacy Engine Pattern Benchmarks
*
* Benchmarks expression evaluation through the full Workflow.expression path
* using the legacy engine.
*
* Run: pnpm --filter=@n8n/performance bench
*/
import { Expression } from 'n8n-workflow';
import {
createWorkflow,
evaluate,
makeSmallData,
makeMediumData,
makeLargeData,
useLegacyEngine,
} from './fixtures/data';
import { definePatternBenchmarks } from './fixtures/pattern-benchmarks';
await useLegacyEngine();
if (Expression.getActiveImplementation() !== 'legacy') {
throw new Error(`Engine not set to 'legacy' — got '${Expression.getActiveImplementation()}'`);
}
const workflow = createWorkflow();
definePatternBenchmarks(
'legacy',
workflow,
evaluate,
makeSmallData(),
makeMediumData(),
makeLargeData(),
);