microsoft / Docker-Provider
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 744 units with 15,356 lines of code in units (57.3% of code).
    • 6 very complex units (1,286 lines of code)
    • 22 complex units (2,500 lines of code)
    • 52 medium complex units (3,122 lines of code)
    • 115 simple units (3,172 lines of code)
    • 549 very simple units (5,276 lines of code)
8% | 16% | 20% | 20% | 34%
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
rb8% | 15% | 20% | 20% | 35%
go14% | 32% | 25% | 14% | 13%
py0% | 0% | 11% | 29% | 59%
cs0% | 0% | 0% | 50% | 49%
cpp0% | 0% | 0% | 34% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/plugins7% | 18% | 22% | 18% | 32%
build/common44% | 22% | 11% | 15% | 6%
build/linux0% | 0% | 13% | 33% | 52%
build/windows0% | 0% | 0% | 38% | 61%
source/toml-parser0% | 0% | 0% | 17% | 83%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
enumerate
in source/plugins/ruby/in_kube_nodes.rb
285 113 0
populateSettingValuesFromConfigMap
in build/common/installer/scripts/tomlparser-prom-customconfig.rb
207 103 1
populateSettingValuesFromConfigMap
in build/common/installer/scripts/tomlparser.rb
117 86 1
parse_and_emit_records
in source/plugins/ruby/in_kube_podinventory.rb
166 78 4
func PostDataHelper()
in source/plugins/go/src/oms.go
311 55 1
getContainerResourceRequestsAndLimits
in source/plugins/ruby/KubernetesApiClient.rb
200 52 5
populateSettingValuesFromConfigMap
in build/common/installer/scripts/tomlparser-agent-config.rb
85 49 1
func InitializePlugin()
in source/plugins/go/src/oms.go
236 46 2
getPodInventoryRecords
in source/plugins/ruby/in_kube_podinventory.rb
157 45 3
populateSettingValuesFromConfigMap
in build/common/installer/scripts/tomlparser-mdm-metrics-config.rb
79 42 1
getContainerInventoryRecords
in source/plugins/ruby/kubernetes_container_inventory.rb
131 39 4
configure
in source/plugins/ruby/out_health_forward.rb
91 38 1
func flushKubeMonAgentEventRecords()
in source/plugins/go/src/oms.go
227 37 0
getMetricNumericValue
in source/plugins/ruby/KubernetesApiClient.rb
116 37 2
enumerate
in source/plugins/ruby/in_kubestate_hpa.rb
117 35 0
enumerate
in source/plugins/ruby/in_kubestate_deployments.rb
114 34 0
filterPVInsightsMetrics
in source/plugins/ruby/filter_cadvisor2mdm.rb
114 33 1
enumerate
in source/plugins/ruby/in_containerinventory.rb
86 33 0
enumerate
in source/plugins/ruby/in_kube_events.rb
97 33 0
enumerate
in source/plugins/ruby/in_kube_podinventory.rb
127 33 1