microsoft / edx-configuration
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 262 units with 3,777 lines of code in units (5.2% of code).
    • 2 very long units (220 lines of code)
    • 5 long units (366 lines of code)
    • 59 medium size units (1,738 lines of code)
    • 53 small units (774 lines of code)
    • 143 very small units (679 lines of code)
5% | 9% | 46% | 20% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py6% | 10% | 45% | 21% | 16%
c0% | 0% | 100% | 0% | 0%
groovy0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
util/vpc-tools26% | 20% | 28% | 14% | 10%
playbooks/edx-east0% | 5% | 54% | 21% | 18%
docker/plays0% | 18% | 52% | 17% | 11%
playbooks/library0% | 29% | 61% | 9% | 0%
playbooks0% | 0% | 65% | 23% | 11%
playbooks/callback_plugins0% | 0% | 52% | 21% | 26%
playbooks/continuous_delivery0% | 0% | 36% | 31% | 32%
playbooks/roles0% | 0% | 36% | 31% | 32%
util/jenkins0% | 0% | 46% | 31% | 21%
util0% | 0% | 0% | 36% | 63%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _ssh_config()
in util/vpc-tools/vpc-tools.py
114 21 1
def parse_args()
in util/vpc-tools/abbey.py
106 1 0
def poll_sqs_ansible()
in util/vpc-tools/abbey.py
87 26 0
def launch_and_configure()
in util/vpc-tools/abbey.py
84 13 1
def create_image()
in docker/plays/library/ec2_ami_2_0_0_1.py
65 14 2
def create_image()
in playbooks/edx-east/library/ec2_ami_2_0_0_1.py
65 14 2
def create_image()
in playbooks/library/ec2_ami_2_0_0_1.py
65 14 2
def read_settings()
in playbooks/ec2.py
50 13 1
def read_settings()
in playbooks/edx-east/ec2.py
50 13 1
def create_ami()
in util/vpc-tools/abbey.py
47 7 3
def add_instance()
in playbooks/ec2.py
46 11 3
def add_instance()
in playbooks/edx-east/ec2.py
46 11 3
def get_host_info()
in playbooks/ec2.py
45 14 1
def get_host_info()
in playbooks/edx-east/ec2.py
45 14 1
def add_rds_instance()
in playbooks/ec2.py
38 5 3
def add_rds_instance()
in playbooks/edx-east/ec2.py
38 5 3
def main()
in docker/plays/library/ec2_ami_2_0_0_1.py
36 10 0
def main()
in playbooks/edx-east/library/ec2_ami_2_0_0_1.py
36 10 0
def main()
in playbooks/library/ec2_ami_2_0_0_1.py
36 10 0
def create_stack()
in util/vpc-tools/create_stack.py
35 6 7