microsoft / frameworkcontroller
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 373 units with 5,155 lines of code in units (73.9% of code).
    • 1 very complex units (293 lines of code)
    • 2 complex units (362 lines of code)
    • 10 medium complex units (651 lines of code)
    • 20 simple units (771 lines of code)
    • 340 very simple units (3,078 lines of code)
5% | 7% | 12% | 14% | 59%
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
go5% | 7% | 12% | 14% | 59%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg/controller18% | 13% | 22% | 17% | 28%
pkg/apis0% | 6% | 8% | 12% | 72%
pkg/barrier0% | 0% | 25% | 50% | 25%
pkg/internal0% | 0% | 0% | 24% | 75%
pkg/client0% | 0% | 0% | 4% | 95%
pkg/common0% | 0% | 0% | 0% | 100%
cmd/frameworkbarrier0% | 0% | 0% | 0% | 100%
cmd/frameworkcontroller0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in pkg/controller/controller.go
293 55 1
func()
in pkg/controller/controller.go
211 40 1
func NewConfig()
in pkg/apis/frameworkcontroller/v1/config.go
151 39 0
func()
in pkg/controller/controller.go
85 20 1
func()
in pkg/controller/controller.go
95 20 1
func()
in pkg/apis/frameworkcontroller/v1/zz_generated.deepcopy.go
76 16 1
func()
in pkg/controller/controller.go
64 16 1
func matchContainerPattern()
in pkg/apis/frameworkcontroller/v1/completion.go
54 15 2
func()
in pkg/apis/frameworkcontroller/v1/funcs.go
49 15 1
func matchPodPattern()
in pkg/apis/frameworkcontroller/v1/completion.go
37 11 2
func generateInjector()
in pkg/barrier/barrier.go
74 11 1
func()
in pkg/controller/controller.go
65 11 1
func()
in pkg/controller/controller.go
52 11 1
func()
in pkg/apis/frameworkcontroller/v1/zz_generated.deepcopy.go
44 10 1
func ClassifyPodCreationError()
in pkg/apis/frameworkcontroller/v1/completion.go
35 9 1
func()
in pkg/apis/frameworkcontroller/v1/zz_generated.deepcopy.go
43 9 1
func newConfig()
in pkg/barrier/barrier.go
57 9 0
func()
in pkg/controller/controller.go
45 9 1
func()
in pkg/apis/frameworkcontroller/v1/funcs.go
89 8 1
func()
in pkg/controller/controller.go
39 8 1