Skip to main content

vulkro-sf perfdelta

Compares two metadata snapshots of the same org and reports a performance regression when governor-limit findings per Apex file go up.

vulkro-sf perfdelta ./release-1.4 ./release-1.5
vulkro-sf perfdelta ./release-1.4 ./release-1.5 --tolerance 0.1 --format json

Both snapshots (retrieved metadata folders or SFDX source trees) are scanned with the Well-Architected anti-pattern engine and compared on two signals:

  • Governor density: governor-limit findings per Apex file (the main signal).
  • Query complexity: AP-089 expensive-join findings per Apex file.

A regression is reported when either density rises beyond --tolerance. Because it measures per file, adding clean Apex is not a regression and deleting clean Apex is not an improvement. It reads local folders only.

Argument or flagWhat it does
<scanA>Baseline (the earlier state).
<scanB>Current (the later state).
--tolerance <fraction>Absorb a rise up to this fraction of the baseline (0.1 allows 10%). Default 0: any rise is flagged.
--format <table|json>Output format. Default table.

Exit codes​

CodeMeaning
0No regression within tolerance.
1A regression was detected.
2Error (unreadable snapshot, scan failure, unknown --format, negative --tolerance).