File Complexity Overall
  • There are 26 files with units, with 1,662 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; 478 lines of code)
    • 3 slightly complex files (McCabe index sum 26-50; 421 lines of code)
    • 21 simple files (McCabe index sum 1-25; 763 lines of code)
  • 1 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 28% | 25% | 45%
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
go0% | 0% | 28% | 25% | 45%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
spectator0% | 0% | 28% | 25% | 45%
Most Complex Files (Top 26)

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
lowlatency_buffer.go
in spectator/writer
282 21 59 21 7
id.go
in spectator/meter
196 16 51 26 11
unixgram_writer.go
in spectator/writer
149 12 36 24 5
registry.go
in spectator
150 27 32 21 4
udp_writer.go
in spectator/writer
122 10 30 25 6
writer.go
in spectator/writer
83 6 23 28 10
line_buffer.go
in spectator/writer
119 12 17 14 2
config.go
in spectator
76 5 16 21 6
file_writer.go
in spectator/writer
45 9 11 24 2
memory_writer.go
in spectator/writer
45 10 10 22 1
noop_writer.go
in spectator/writer
12 8 8 67 1
stderr_writer.go
in spectator/writer
30 8 8 27 1
stdout_writer.go
in spectator/writer
30 8 8 27 1
counter.go
in spectator/meter
31 6 8 26 2
gauge.go
in spectator/meter
32 7 7 22 1
age_gauge.go
in spectator/meter
26 5 6 23 2
common_tags.go
in spectator
24 2 5 21 4
percentile_distsummary.go
in spectator/meter
23 4 5 22 2
dist_summary.go
in spectator/meter
23 4 5 22 2
timer.go
in spectator/meter
24 4 5 21 2
percentile_timer.go
in spectator/meter
27 4 5 19 2
logger.go
in spectator/logger
24 4 4 17 1
protocol_parser.go
in spectator
26 1 4 15 4
max_gauge.go
in spectator/meter
21 4 4 19 1
monotonic_counter.go
in spectator/meter
21 4 4 19 1
monotonic_counter_uint.go
in spectator/meter
21 4 4 19 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...