microsoft / service-fabric-cli
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 145 units with 2,244 lines of code in units (86.6% of code).
    • 2 very long units (425 lines of code)
    • 4 long units (275 lines of code)
    • 16 medium size units (518 lines of code)
    • 34 small units (543 lines of code)
    • 89 very small units (483 lines of code)
18% | 12% | 23% | 24% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py18% | 12% | 23% | 24% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/sfctl19% | 12% | 23% | 23% | 20%
src/checkers0% | 0% | 0% | 88% | 11%
scripts0% | 0% | 0% | 32% | 67%
src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def load_command_table()
in src/sfctl/commands.py
285 3 2
def custom_arguments()
in src/sfctl/params.py
140 3 2
def create()
in src/sfctl/custom_service.py
76 3 34
def provision_application_type()
in src/sfctl/custom_app_type.py
72 9 10
def upload()
in src/sfctl/custom_app.py
69 26 11
def update()
in src/sfctl/custom_service.py
58 3 22
def upload_to_native_imagestore()
in src/sfctl/custom_app.py
50 10 7
def upgrade()
in src/sfctl/custom_app.py
46 2 20
def check_cluster_version()
in src/sfctl/custom_cluster.py
42 10 2
def parse_chaos_parameters()
in src/sfctl/custom_chaos.py
36 4 1
def upgrade()
in src/sfctl/custom_compose.py
36 1 23
32 21 1
def start()
in src/sfctl/custom_chaos.py
32 1 16
def upgrade()
in src/sfctl/custom_cluster_upgrade.py
32 1 24
def update_upgrade()
in src/sfctl/custom_cluster_upgrade.py
32 1 23
def validate_update_service_params()
in src/sfctl/custom_service.py
29 11 9
def compress_package()
in src/sfctl/custom_app.py
27 8 2
26 3 8
def invoke_api()
in src/sfctl/custom_container.py
26 1 11
def logs()
in src/sfctl/custom_container.py
26 4 8