microsoft / jupyter-Kqlmagic
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 697 units with 7,235 lines of code in units (68.6% of code).
    • 2 very complex units (266 lines of code)
    • 9 complex units (737 lines of code)
    • 44 medium complex units (1,504 lines of code)
    • 73 simple units (1,355 lines of code)
    • 569 very simple units (3,373 lines of code)
3% | 10% | 20% | 18% | 46%
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
py3% | 10% | 20% | 18% | 46%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
azure/Kqlmagic3% | 10% | 21% | 18% | 45%
ROOT0% | 0% | 0% | 24% | 76%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _build_chart_sub_tables()
in azure/Kqlmagic/column_guesser.py
95 56 4
def acquire_token()
in azure/Kqlmagic/my_aad_helper_msal.py
171 55 1
def acquire_token()
in azure/Kqlmagic/my_aad_helper.py
132 40 1
def _convert()
in azure/Kqlmagic/parser.py
79 40 6
def parse()
in azure/Kqlmagic/parser.py
76 37 7
def _parse_kql_options()
in azure/Kqlmagic/parser.py
100 34 6
def kql_code_score()
in azure/Kqlmagic/activate_kernel_command.py
61 32 1
def _parse_kql_command()
in azure/Kqlmagic/parser.py
90 27 5
def parse_and_get_kv_string()
in azure/Kqlmagic/parser.py
67 27 5
def _parse_one_section()
in azure/Kqlmagic/parser.py
51 26 8
def parse_old()
in azure/Kqlmagic/parser.py
81 26 7
def to_dataframe()
in azure/Kqlmagic/kql_proxy.py
37 25 3
def get_schema_tree()
in azure/Kqlmagic/database_html.py
36 24 3
def _get_window_html()
in azure/Kqlmagic/display.py
37 22 12
def execute()
in azure/Kqlmagic/draft_client.py
92 22 5
def extended_properties()
in azure/Kqlmagic/kql_response.py
55 22 1
def get_details()
in azure/Kqlmagic/my_aad_helper_msal.py
33 22 1
def get_module()
in azure/Kqlmagic/dependencies.py
49 21 6
def get_details()
in azure/Kqlmagic/my_aad_helper.py
30 21 1
def _warn_token_diff_from_conn_str()
in azure/Kqlmagic/my_aad_helper.py
28 21 1