File Complexity Overall
  • There are 36 files with units, with 7,876 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 3 complex files (McCabe index sum 126-250; 1,425 lines of code)
    • 7 medium complex files (McCabe index sum 51-125; 3,125 lines of code)
    • 7 slightly complex files (McCabe index sum 26-50; 1,273 lines of code)
    • 19 simple files (McCabe index sum 1-25; 2,053 lines of code)
  • 25 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 18% | 39% | 16% | 26%
Legend:
251+
126-250
51-125
26-50
1-25


explore: grouped by folders | grouped by complexity
File Complexity per Extension
251+
126-250
51-125
26-50
1-25
ts0% | 18% | 39% | 16% | 26%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
src0% | 18% | 39% | 16% | 26%
Most Complex Files (Top 36)

The McCabe index of a file grows with its size: per 100 lines tells a large but plain file from a dense one, and most complex unit whether the complexity sits in one unit or is spread over many.

File# lines# unitsMcCabe index
(sum)
per 100
lines
most complex
unit
agents.ts
in src
576 26 144 25 21
conversation.ts
in src/utils
309 24 143 46 13
540 27 135 25 28
pii.ts
in src/checks
806 18 98 12 16
cli.ts
in src
367 7 90 25 38
llm-base.ts
in src/checks
446 16 81 18 15
guardrail-evals.ts
in src/evals
586 15 71 12 9
514 17 68 13 9
async-engine.ts
in src/evals/core
262 13 63 24 13
schema.ts
in src/utils
144 7 60 42 24
types.ts
in src
249 9 47 19 11
benchmark-reporter.ts
in src/evals/core
220 10 45 20 10
168 8 36 21 12
output.ts
in src/utils
114 5 33 29 12
benchmark-calculator.ts
in src/evals/core
190 7 32 17 8
parsing.ts
in src/utils
93 8 29 31 11
secret-keys.ts
in src/checks
239 5 27 11 11
validate-dataset.ts
in src/evals/core
88 3 25 28 17
131 4 22 17 8
jsonl-loader.ts
in src/evals/core
73 2 21 29 18
vector-store.ts
in src/utils
84 6 20 24 5
urls.ts
in src/checks
454 3 19 4 12
client.ts
in src
173 15 18 10 2
148 2 15 10 14
content.ts
in src/utils
38 4 9 24 3
moderation.ts
in src/checks
160 3 8 5 4
24 1 8 33 8
38 5 6 16 2
latency-tester.ts
in src/evals/core
69 2 5 7 4
json-reporter.ts
in src/evals/core
35 2 5 14 4
221 2 5 2 3
27 1 5 19 5
context.ts
in src/utils
58 4 4 7 1
visualizer.ts
in src/evals/core
32 2 3 9 2
chat.ts
in src/resources/chat
94 2 2 2 1
responses.ts
in src/resources/responses
106 1 1 1 1
About This Analysis
  • File complexity is the sum of the McCabe indexes (conditional complexity) of the units (methods, functions...) in a file.
  • Files are classified in five categories based on that sum: 1-25 (simple files), 26-50 (slightly complex files), 51-125 (medium complex files), 126-250 (complex files), 251+ (very complex files). The default bands are five times the unit complexity bands, as a file is a group of units.
  • Only main code files with units are classified. Files without units (languages without unit analysis, or files without functions) have no complexity to measure and are left out rather than counted as simple.
  • A very complex file holds many decisions, which often means it has too many responsibilities: a candidate to split, and a place where changes need more testing.
Learn more...