aws / eks-distro-build-tooling
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 82 units with 1,493 lines of code in units (32.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (85 lines of code)
    • 3 medium complex units (275 lines of code)
    • 4 simple units (219 lines of code)
    • 74 very simple units (914 lines of code)
0% | 5% | 18% | 14% | 61%
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
js0% | 28% | 0% | 8% | 63%
go0% | 0% | 23% | 16% | 60%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
generate-attribution0% | 28% | 0% | 8% | 63%
release/pkg0% | 0% | 29% | 21% | 49%
release/api/v1alpha10% | 0% | 0% | 0% | 100%
release/cmd0% | 0% | 0% | 0% | 100%
release0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async function populateVersionAndModuleFromDep()
in generate-attribution/generate-attribution-file.js
85 26 1
func()
in release/pkg/assets_k8s.go
202 18 1
func parseKubeGitVersionContent()
in release/pkg/kube_reader.go
43 13 1
func parseReleaseForUri()
in release/pkg/get_artifact_uri.go
30 12 5
async function groupByLicense()
in generate-attribution/generate-attribution-file.js
26 7 1
func()
in release/pkg/assets_cni.go
52 6 1
func()
in release/pkg/assets_etcd.go
69 6 1
func()
in release/pkg/assets_authenticator.go
72 6 1
func UpdateImageDigests()
in release/pkg/generate_spec.go
30 5 3
func()
in release/api/v1alpha1/zz_generated.deepcopy.go
18 4 1
func initConfig()
in release/cmd/root.go
17 4 0
async function getPackageRepo()
in generate-attribution/generate-attribution-file.js
33 4 1
async function readLicenseContent()
in generate-attribution/generate-attribution-file.js
21 4 2
async function populateLicenseAndNoticeContent()
in generate-attribution/generate-attribution-file.js
19 4 1
func GetAssetUri()
in release/pkg/get_artifact_uri.go
11 3 5
func()
in release/pkg/generate_spec.go
25 3 1
func()
in release/pkg/file_reader.go
13 3 1
func readShaFile()
in release/pkg/file_reader.go
10 3 1
func getEksdRelease()
in release/pkg/file_reader.go
11 3 1
func readHttpFile()
in release/pkg/file_reader.go
12 3 1