kubernetes / release
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 1,921 units with 24,184 lines of code in units (75.9% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (606 lines of code)
    • 47 medium complex units (3,242 lines of code)
    • 97 simple units (3,332 lines of code)
    • 1,772 very simple units (17,004 lines of code)
0% | 2% | 13% | 13% | 70%
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% | 2% | 13% | 13% | 70%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cmd/krel0% | 8% | 36% | 16% | 38%
pkg/fastforward0% | 9% | 0% | 2% | 88%
pkg/changelog0% | 6% | 2% | 6% | 85%
pkg/announce0% | 32% | 0% | 26% | 41%
pkg/notes0% | 4% | 27% | 34% | 33%
pkg/release0% | 0% | 15% | 15% | 68%
pkg/anago0% | 0% | 5% | 2% | 92%
pkg/gcp0% | 0% | 24% | 9% | 65%
pkg/build0% | 0% | 32% | 9% | 58%
pkg/kubepkg0% | 0% | 21% | 17% | 61%
packages/deb0% | 0% | 22% | 60% | 16%
cmd/release-notes0% | 0% | 32% | 0% | 67%
pkg/binary0% | 0% | 9% | 42% | 48%
pkg/cve0% | 0% | 0% | 49% | 50%
cmd/ci-reporter0% | 0% | 0% | 38% | 61%
cmd/schedule-builder0% | 0% | 0% | 42% | 57%
pkg/testgrid0% | 0% | 0% | 23% | 76%
cmd/publish-release0% | 0% | 0% | 25% | 74%
images/build0% | 0% | 0% | 60% | 39%
pkg/mail0% | 0% | 0% | 13% | 86%
pkg/kubecross0% | 0% | 0% | 0% | 100%
cmd/kubepkg0% | 0% | 0% | 0% | 100%
cmd/gcbuilder0% | 0% | 0% | 0% | 100%
pkg/version0% | 0% | 0% | 0% | 100%
pkg/testing0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func UpdateGitHubPage()
in pkg/announce/github_page.go
126 28 1
func()
in pkg/notes/options/options.go
67 28 1
func fixReleaseNotes()
in cmd/krel/cmd/release_notes.go
148 27 2
func()
in pkg/fastforward/fastforward.go
135 27 1
func()
in pkg/changelog/changelog.go
130 26 1
func createDraftPR()
in cmd/krel/cmd/release_notes.go
152 25 2
func editReleaseNote()
in cmd/krel/cmd/release_notes.go
120 25 4
func()
in pkg/anago/stage.go
90 23 1
func WriteReleaseNotes()
in cmd/release-notes/main.go
91 22 1
func()
in pkg/gcp/gcb/gcb.go
99 22 1
func()
in pkg/release/repository.go
95 21 1
func()
in pkg/gcp/gcb/gcb.go
89 20 1
func runReleaseNotes()
in cmd/krel/cmd/release_notes.go
59 19 0
func releaseNotesJSON()
in cmd/krel/cmd/release_notes.go
100 19 2
func()
in pkg/notes/notes.go
84 19 1
func WriteChecksums()
in pkg/release/release.go
90 19 1
func ListBuildBinaries()
in pkg/release/workspace.go
88 17 2
func GenerateReleaseVersion()
in pkg/release/release_version.go
95 17 4
func()
in pkg/anago/stage.go
88 16 1
func()
in packages/deb/build.go
78 16 1