mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-24 21:35:24 +02:00
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
36 lines
792 B
TypeScript
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(),
|
|
);
|