microsoft / service-fabric-cli
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 145 units with 2,244 lines of code in units (86.6% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (69 lines of code)
    • 3 medium complex units (79 lines of code)
    • 11 simple units (312 lines of code)
    • 130 very simple units (1,784 lines of code)
0% | 3% | 3% | 13% | 79%
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
py0% | 3% | 3% | 13% | 79%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/sfctl0% | 3% | 3% | 13% | 79%
src/checkers0% | 0% | 0% | 88% | 11%
scripts0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def upload()
in src/sfctl/custom_app.py
69 26 11
32 21 1
def select_arg_verify()
in src/sfctl/custom_cluster.py
18 18 7
def validate_update_service_params()
in src/sfctl/custom_service.py
29 11 9
def upload_to_native_imagestore()
in src/sfctl/custom_app.py
50 10 7
def check_cluster_version()
in src/sfctl/custom_cluster.py
42 10 2
def set_auth()
in src/sfctl/config.py
16 9 4
def provision_application_type()
in src/sfctl/custom_app_type.py
72 9 10
def compress_package()
in src/sfctl/custom_app.py
27 8 2
def repo_creds()
in src/sfctl/custom_compose.py
19 8 3
def process_module()
in src/checkers/lca_header.py
15 7 2
def upload_to_fileshare()
in src/sfctl/custom_app.py
20 6 3
def json_encoded()
in src/sfctl/params.py
20 6 1
def check_and_send_telemetry()
in src/sfctl/telemetry.py
18 6 3
def send_telemetry()
in src/sfctl/telemetry.py
13 6 0
def signed_session()
in src/sfctl/auth.py
12 5 2
def create()
in src/sfctl/custom_app.py
23 5 10
def parse_service_health_policy_map()
in src/sfctl/custom_health.py
18 5 1
def parse_app_health_map()
in src/sfctl/custom_health.py
17 5 1
def parse_package_sharing_policies()
in src/sfctl/custom_service.py
15 5 1