microsoft / jupyter-Kqlmagic
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 697 units with 7,235 lines of code in units (68.6% of code).
    • 2 very long units (303 lines of code)
    • 12 long units (939 lines of code)
    • 69 medium size units (2,042 lines of code)
    • 112 small units (1,621 lines of code)
    • 502 very small units (2,330 lines of code)
4% | 12% | 28% | 22% | 32%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py4% | 12% | 28% | 22% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
azure/Kqlmagic4% | 13% | 28% | 22% | 31%
ROOT0% | 0% | 16% | 36% | 46%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
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 _parse_kql_options()
in azure/Kqlmagic/parser.py
100 34 6
def _build_chart_sub_tables()
in azure/Kqlmagic/column_guesser.py
95 56 4
def execute()
in azure/Kqlmagic/draft_client.py
92 22 5
def execute()
in azure/Kqlmagic/kusto_client.py
92 19 5
def _parse_kql_command()
in azure/Kqlmagic/parser.py
90 27 5
def parse_old()
in azure/Kqlmagic/parser.py
81 26 7
def _convert()
in azure/Kqlmagic/parser.py
79 40 6
def parse()
in azure/Kqlmagic/parser.py
76 37 7
def parse_and_get_kv_string()
in azure/Kqlmagic/parser.py
67 27 5
def kql_code_score()
in azure/Kqlmagic/activate_kernel_command.py
61 32 1
def extended_properties()
in azure/Kqlmagic/kql_response.py
55 22 1
def _parse_one_section()
in azure/Kqlmagic/parser.py
51 26 8
def get_module()
in azure/Kqlmagic/dependencies.py
49 21 6
def _get_authentication_error_kwargs()
in azure/Kqlmagic/my_aad_helper_msal.py
49 19 1
def _get_authentication_error_kwargs()
in azure/Kqlmagic/my_aad_helper.py
47 18 1
def __init__()
in azure/Kqlmagic/my_aad_helper_msal.py
47 8 6
def _object_to_kql()
in azure/Kqlmagic/parameterizer.py
42 19 2
def _guess_object_types()
in azure/Kqlmagic/parameterizer.py
42 19 3