golang / sync
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 29 units with 390 lines of code in units (79.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 8 simple units (194 lines of code)
    • 21 very simple units (196 lines of code)
0% | 0% | 0% | 49% | 50%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
go0% | 0% | 0% | 49% | 50%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
syncmap0% | 0% | 0% | 64% | 35%
semaphore0% | 0% | 0% | 48% | 51%
singleflight0% | 0% | 0% | 31% | 68%
errgroup0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in semaphore/semaphore.go
36 9 1
func()
in singleflight/singleflight.go
27 8 1
func()
in syncmap/pre_go19.go
23 7 1
func()
in syncmap/pre_go19.go
29 7 1
func()
in syncmap/pre_go19.go
22 7 1
func()
in syncmap/pre_go19.go
18 6 1
func()
in syncmap/pre_go19.go
16 6 1
func()
in syncmap/pre_go19.go
23 6 1
func()
in syncmap/pre_go19.go
15 5 1
func()
in syncmap/pre_go19.go
11 5 1
func()
in singleflight/singleflight.go
23 5 1
func()
in syncmap/pre_go19.go
12 4 1
func()
in semaphore/semaphore.go
15 4 1
func()
in syncmap/pre_go19.go
7 3 1
func()
in syncmap/pre_go19.go
10 3 1
func()
in singleflight/singleflight.go
19 3 1
func()
in semaphore/semaphore.go
9 3 1
func()
in errgroup/errgroup.go
14 3 1
func()
in syncmap/pre_go19.go
9 2 1
func newPanicError()
in singleflight/singleflight.go
7 2 1