bench(lint): with prefer-direct-reexport rule - #34
Conversation
2222742 to
55fc7dd
Compare
Results — lint performance delta is below the noise floorFull workspace lint, 247 projects, uncached,
The spread within the baseline alone (1148→1169 = 21s, 1.8%) is larger than the difference between the two PRs, so the wall-clock delta is not distinguishable from runner noise. Per-rule attribution (the reliable number)Wall-clock on shared runners is noisy, so the rule was also profiled directly with ESLint's own profiler on
This is expected: the rule is purely syntactic + scope-based. It does no type resolution, which is what makes the type-aware rules expensive. ConclusionThe rule's lint cost is negligible. Total lint time is dominated by TypeScript program construction ( Methodology note — first run was invalid, and was discardedThe initial attempt used Fixed by adding an untimed Caveats
|
Purpose
With-rule side for measuring the lint performance cost of the
prefer-direct-reexportESLint rule.Baseline to compare against: #33 (
bench/lint-baseline).This branch is #33 plus exactly 4 files and nothing else:
The benchmark CI job is the same commit object as in #33, so the measurement harness is not a variable.
Method
--allnx affectedwould skew asymmetrically--skipNxCachelintiscache: true; otherwise we would time cache replays--excludeTaskDependenciesnx.jsonsetslint.dependsOn: ["build"]; keeps build time out of the measurement--nxBailRun 3× per PR; compare the fastest run of each.
A second, runner-independent measurement runs
TIMING=25 eslint srconreact-components/react-button/libraryand dumps ESLint's per-rule profiler table into the job summary. Since the config usesprojectService: true(type-aware linting), TypeScript program construction likely dominates total lint time — so this table, not the wall-clock delta, is the more reliable attribution of the rule's own cost.Expected
The lint job exits non-zero here: the rule is enabled as
errorand the codebase has ~264 pre-existing violations that have never been cleaned up. That is intentional and does not affect timing (no--nxBail; every project is linted on every run). Note that formatting/serialising those violations is itself work the baseline does not do — a small bias in favour of the baseline, inherent to comparing against plainmaster.Throwaway branch; not intended to merge.