File Complexity Overall
  • There are 66 files with units, with 13,390 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 1 complex files (McCabe index sum 126-250; 1,454 lines of code)
    • 8 medium complex files (McCabe index sum 51-125; 3,973 lines of code)
    • 9 slightly complex files (McCabe index sum 26-50; 2,853 lines of code)
    • 48 simple files (McCabe index sum 1-25; 5,110 lines of code)
  • 45 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 10% | 29% | 21% | 38%
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
c0% | 37% | 46% | 0% | 16%
py0% | 0% | 13% | 37% | 48%
cc0% | 0% | 54% | 0% | 45%
m0% | 0% | 100% | 0% | 0%
ts0% | 0% | 38% | 0% | 61%
hpp0% | 0% | 0% | 75% | 24%
h0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
gpt_oss0% | 11% | 29% | 22% | 35%
compatibility-test0% | 0% | 38% | 0% | 61%
gpt-oss-mcp-server0% | 0% | 0% | 0% | 100%
_build0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 50)

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
metal-kernels.c
in gpt_oss/metal/source
1454 27 166 11 10
context.c
in gpt_oss/metal/source
1010 12 104 10 36
model.c
in gpt_oss/metal/source
514 9 88 17 67
apply_patch.py
in gpt_oss/tools
402 24 83 21 18
end-to-end-threadgroup.cc
in gpt_oss/metal/benchmark
502 14 82 16 9
metal.m
in gpt_oss/metal/source
423 19 69 16 11
runCase.ts
in compatibility-test
284 6 62 22 19
generate.c
in gpt_oss/metal/source
285 7 59 21 29
simple_browser_tool.py
in gpt_oss/tools/simple_browser
553 29 58 10 12
chat.py
in gpt_oss
326 2 47 14 43
docker_tool.py
in gpt_oss/tools/python_docker
293 15 45 15 22
metal.hpp
in gpt_oss/metal/source/include/internal
284 35 43 15 2
page_contents.py
in gpt_oss/tools/simple_browser
208 19 38 18 10
model.py
in gpt_oss/triton
453 21 36 8 8
healthbench_eval.py
in gpt_oss/evals
463 15 31 7 6
ollama.py
in gpt_oss/responses_api/inference
128 5 30 23 24
model.py
in gpt_oss/torch
410 20 29 7 6
create-local-model.py
in gpt_oss/metal/scripts
288 9 26 9 15
end-to-end.cc
in gpt_oss/metal/benchmark
198 2 25 13 16
__main__.py
in gpt_oss/evals
190 1 24 13 24
analysis.ts
in compatibility-test
116 2 24 21 21
index.ts
in compatibility-test
177 5 18 10 11
tokenizer.c
in gpt_oss/metal/source
89 7 17 19 6
aime_eval.py
in gpt_oss/evals
81 5 15 19 7
uuid.h
in gpt_oss/metal/source/include/internal
103 4 15 15 12
api_server.py
in gpt_oss/responses_api
1233 11 15 1 2
weights.py
in gpt_oss/torch
99 5 14 14 6
responses_sampler.py
in gpt_oss/evals
71 3 13 18 11
token_generator.py
in gpt_oss/vllm
44 2 13 30 12
report.py
in gpt_oss/evals
89 5 12 13 8
backend.py
in _build/gpt_oss_build_backend
75 11 12 16 2
triton.py
in gpt_oss/responses_api/inference
75 3 11 15 9
build-system-prompt.py
in gpt-oss-mcp-server
88 2 11 13 6
80 3 10 13 8
math.h
in gpt_oss/metal/source/include/internal
31 6 10 32 2
vllm.py
in gpt_oss/responses_api/inference
43 3 10 23 6
abcd_grader.py
in gpt_oss/evals
78 2 9 12 5
backend.py
in gpt_oss/tools/simple_browser
210 4 9 4 3
attention.py
in gpt_oss/triton
175 4 9 5 5
module.c
in gpt_oss/metal/python
53 1 8 15 8
datatype.hpp
in gpt_oss/metal/source/include/internal
74 7 7 9 1
gpqa_eval.py
in gpt_oss/evals
92 3 6 7 3
tool.py
in gpt_oss/tools
52 6 6 12 1
context.c
in gpt_oss/metal/python
236 2 6 3 5
log.c
in gpt_oss/metal/source
37 1 6 16 6
moe.py
in gpt_oss/triton
49 3 6 12 3
utils.py
in gpt_oss/torch
28 2 6 21 3
metal.py
in gpt_oss/responses_api/inference
23 1 5 22 5
browser_server.py
in gpt-oss-mcp-server
90 2 5 6 4
model.c
in gpt_oss/metal/python
77 2 4 5 3
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...