aws / eks-distro
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 41 units with 459 lines of code in units (59.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (141 lines of code)
    • 1 simple units (38 lines of code)
    • 38 very simple units (280 lines of code)
0% | 0% | 30% | 8% | 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
go0% | 0% | 30% | 8% | 61%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cmd0% | 0% | 82% | 0% | 17%
cmd/release/number0% | 0% | 46% | 32% | 20%
cmd/release/internal0% | 0% | 0% | 0% | 100%
cmd/release/pull_request0% | 0% | 0% | 0% | 100%
cmd/release/number/internal0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func main()
in cmd/main_postsubmit.go
87 13 0
func main()
in cmd/release/number/main.go
54 12 0
func updateKubeGitVersionFile()
in cmd/release/number/main.go
38 9 1
func newRelease()
in cmd/release/internal/release.go
45 5 3
func determineReleaseNumber()
in cmd/release/internal/release_numbers.go
19 5 1
func convertFilePaths()
in cmd/release/pull_request/pr_input.go
14 4 1
func()
in cmd/main_postsubmit.go
19 3 1
func initializeRelease()
in cmd/release/number/main.go
8 3 3
func cleanUpIfError()
in cmd/release/number/main.go
10 3 1
func determinePreviousReleaseNumber()
in cmd/release/internal/release_numbers.go
12 3 1
func()
in cmd/release/pull_request/open_pr.go
16 2 1
func NewPullRequestForDocs()
in cmd/release/pull_request/pr_input.go
8 2 1
func NewPullRequestForNumber()
in cmd/release/pull_request/pr_input.go
8 2 1
func getCommonPullRequest()
in cmd/release/pull_request/pr_input.go
11 2 2
func openNumberPR()
in cmd/release/number/internal/number_pr.go
7 2 1
func updateEnvironmentReleaseNumber()
in cmd/release/number/main.go
6 2 2
func NewReleaseWithOverrideNumber()
in cmd/release/internal/release.go
6 2 2
func getGitRootDirectory()
in cmd/release/internal/directories.go
7 2 0
func GetKubernetesReleaseGitTag()
in cmd/release/internal/directories.go
7 2 1
func formatBranch()
in cmd/release/pull_request/pr_input.go
3 1 1