File Complexity Overall
  • There are 43 files with units, with 5,139 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 0 complex files (McCabe index sum 126-250; 0 lines of code)
    • 2 medium complex files (McCabe index sum 51-125; 746 lines of code)
    • 2 slightly complex files (McCabe index sum 26-50; 984 lines of code)
    • 39 simple files (McCabe index sum 1-25; 3,409 lines of code)
  • 50 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 14% | 19% | 66%
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
py0% | 0% | 46% | 8% | 44%
hpp0% | 0% | 0% | 25% | 74%
cpp0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
deep_ep0% | 0% | 46% | 8% | 44%
csrc0% | 0% | 0% | 23% | 76%
Most Complex Files (Top 43)

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
bucket.py
in deep_ep/buffers
272 20 94 35 21
ep.py
in deep_ep/buffers
474 16 77 16 17
envs.py
in deep_ep/utils
138 17 35 25 6
ep.hpp
in csrc/buffers
846 9 29 3 8
refs.py
in deep_ep/utils
134 4 25 19 11
math.py
in deep_ep/utils
80 11 22 28 5
gate.py
in deep_ep/utils
101 7 21 21 8
find_pkgs.py
in deep_ep/utils
44 3 21 48 17
all_gather.hpp
in csrc/kernels/bucket
180 1 20 11 20
symmetric.hpp
in csrc/kernels/comm
261 8 19 7 4
handle.py
in deep_ep/comm
46 7 17 37 7
engram.py
in deep_ep/buffers
120 8 16 13 5
context.cpp
in csrc/kernels/comm
215 9 15 7 3
engram.hpp
in csrc/buffers
279 7 15 5 4
bucket.hpp
in csrc/buffers
304 4 14 5 7
event.py
in deep_ep/utils
33 7 13 39 4
reduce_scatter.hpp
in csrc/kernels/bucket
151 1 13 9 13
driver.cpp
in csrc/kernels/driver
77 6 12 16 3
dispatch.hpp
in csrc/kernels/ep
195 4 10 5 7
base.hpp
in csrc/buffers
48 4 8 17 3
pp.py
in deep_ep/buffers
33 4 7 21 2
__init__.py
in deep_ep
48 2 7 15 6
all_reduce.hpp
in csrc/kernels/bucket
117 1 7 6 7
base.py
in deep_ep/buffers
17 4 6 35 2
allocator.py
in deep_ep/buffers
25 3 6 24 4
pp.hpp
in csrc/buffers
117 4 6 5 2
engram.hpp
in csrc/kernels/engram
100 2 5 5 4
barrier.hpp
in csrc/comm
34 1 5 15 5
stream.hpp
in csrc/comm
21 4 4 19 1
system.hpp
in csrc/utils
23 1 4 17 4
semantic.py
in deep_ep/utils
15 2 3 20 2
pp_send_recv.hpp
in csrc/kernels/pp
82 3 3 4 1
combine.hpp
in csrc/kernels/ep
170 3 3 2 1
jit.hpp
in csrc/runtime
42 2 3 7 2
event.hpp
in csrc/utils
27 3 3 11 1
barrier.py
in deep_ep/comm
7 1 2 29 2
barrier.hpp
in csrc/kernels/comm
40 1 2 5 2
stream.py
in deep_ep/comm
6 1 1 17 1
prefetch_weights.hpp
in csrc/kernels/ep
51 1 1 2 1
reduce_grads.hpp
in csrc/kernels/ep
54 1 1 2 1
api.hpp
in csrc/kernels/comm
67 1 1 1 1
handle.hpp
in csrc/comm
26 1 1 4 1
tensor.hpp
in csrc/utils
19 1 1 5 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...