kubernetes / community
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 47 units with 921 lines of code in units (15.5% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (70 lines of code)
    • 4 medium complex units (228 lines of code)
    • 9 simple units (324 lines of code)
    • 33 very simple units (299 lines of code)
0% | 7% | 24% | 35% | 32%
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% | 15% | 13% | 42% | 28%
py0% | 0% | 35% | 28% | 36%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
generator0% | 15% | 13% | 42% | 28%
sig-contributor-experience/surveys/k8s_survey_analysis0% | 0% | 38% | 28% | 32%
hack0% | 0% | 0% | 29% | 70%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in generator/app.go
70 30 1
def process_header()
in sig-contributor-experience/surveys/k8s_survey_analysis/prepare_2019.py
36 16 1
def get_df()
in sig-contributor-experience/surveys/k8s_survey_analysis/prepare_2019.py
37 16 1
func main()
in generator/app.go
60 15 0
def make_bar_chart()
in sig-contributor-experience/surveys/k8s_survey_analysis/plot_utils.py
95 12 4
def get_df()
in sig-contributor-experience/surveys/k8s_survey_analysis/prepare_2018.py
21 10 1
def make_single_likert_chart()
in sig-contributor-experience/surveys/k8s_survey_analysis/plot_utils.py
102 9 5
func getExistingContent()
in generator/app.go
32 9 2
31 9 2
func createAnnualReport()
in generator/app.go
34 9 2
func writeTemplate()
in generator/app.go
30 7 4
func createGroupReadme()
in generator/app.go
23 7 2
func()
in generator/app.go
38 6 1
def repos_from_k8s_group()
in hack/generate-devstats-repo-sql.py
13 6 1
def split_for_likert()
in sig-contributor-experience/surveys/k8s_survey_analysis/plot_utils.py
37 5 2
18 5 3
def write_repo_groups_sql()
in hack/generate-devstats-repo-sql.py
10 4 2
def get_single_year_data_subset()
in sig-contributor-experience/surveys/k8s_survey_analysis/plot_utils.py
17 3 3
def make_single_bar_chart_multi_year()
in sig-contributor-experience/surveys/k8s_survey_analysis/plot_utils.py
33 3 4
func()
in generator/app.go
17 3 1