ArchSutra AI GitHub

ArchSutra AI / Handbook

Performance and quality metrics

Measured speed, memory, test coverage and robustness checks, with the exact commands and caveats.

Version 0.1.5 · Source: docs/handbook/16-performance-and-quality-metrics.md

All numbers are measured, reproducible, and from a developer laptop (Windows 11), so absolute timings are pessimistic compared with Linux CI because of slower file-system access and antivirus scanning.

Speed and memory (synthetic repositories)#

Generated by node scripts/bench.mjs into docs/proof/benchmarks.md. Each case runs in a fresh process so peak memory is meaningful.

CaseFiles scannedTimePeak RSS
small (200 files)201about 0.4 sabout 60 MB
medium (1 000 files)1 001about 2 sabout 100 MB
at the default file limit (5 000)5 000about 6 to 10 sabout 240 MB
over the limit (20 000 generated)5 000, reported as truncatedabout 7 sabout 240 MB

Speed on real repositories#

From docs/proof/realworld/results*.json (52 repositories, shallow clones): median 1.2 s per repository; typical small libraries under 0.5 s; the largest (5 000-file limit reached: django, webpack, prettier) take roughly 8 to 10 s on a quiet machine and up to 35 s when the machine is busy. Timings include reading files and all rules.

Bounds (why runtime is limited)#

LimitDefaultEffect
Files5 000stop collecting, mark truncated
Size per file512 KiBlarger files skipped and counted
Total bytes120 MiBstop collecting, mark truncated
Traversal time15 sstop walking, mark truncated
Text cache160 MiBbeyond that files are re-read instead of cached
Line length scanned2 000 characterslonger lines skipped (also a ReDoS guard)

The 15-second budget covers the directory traversal only; the rule scan after it is bounded by the file, size and byte caps. Truncation is always reported in the output ("TRUNCATED" and a blind-spot line), never silent.

Test coverage#

Node's built-in coverage over dist/ (report: docs/proof/coverage.txt):

MetricValue
Lines92.4%
Branches80.7%
Functions91.1%

Weakest areas: CLI argument-error branches and rarely used verify branches. CI prints coverage on every run; no minimum is enforced yet.

Robustness checks in the test suite#

CheckTest
Pathological and very long lines finish under 3 s (ReDoS guard)adversarial inputs: long and pathological lines ...
Hostile file names, binary content, bidi characters never crash or executehostile file names and binary content ...
Path traversal rejectedsafeJoin rejects traversal, export ... blocks escaping --output
Symlinks not followedwalk does not follow symlinks
Secrets never appear in outputredact ..., audit finds seeded problems ...
Total-byte budget reported as truncationtotal-bytes budget truncates and reports it

Quality gates in CI#

Typecheck (strict TypeScript), 36 tests on Ubuntu and Windows across Node 20, 22 and 24 (plus Ubuntu on the newest Node), structural verification of skills, agents, links and diagrams, a self-audit with --fail-on high, a production-dependency check, CodeQL, and (on pull requests) the DCO check. macOS is not in CI.

Edit this page on GitHub