aws-samples / managing-content-delivery-aws-elemental-mediapackage-origins
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 8 units with 128 lines of code in units (67.0% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (60 lines of code)
    • 0 medium size units (0 lines of code)
    • 1 small units (18 lines of code)
    • 6 very small units (50 lines of code)
0% | 46% | 0% | 14% | 39%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 46% | 0% | 14% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda-functions/aemp-cloudfront-sync-function0% | 46% | 0% | 14% | 39%
Alternative Visuals
Longest Units
Top 8 longest units
Unit# linesMcCabe index# params
def update_distribution_config()
in lambda-functions/aemp-cloudfront-sync-function/function.py
60 16 5
def handler()
in lambda-functions/aemp-cloudfront-sync-function/function.py
18 3 2
def get_origin_pathpatterns()
in lambda-functions/aemp-cloudfront-sync-function/function.py
10 3 1
def get_playable_endpoints()
in lambda-functions/aemp-cloudfront-sync-function/function.py
9 3 1
def list_assets()
in lambda-functions/aemp-cloudfront-sync-function/function.py
9 3 1
def create_new_origin()
in lambda-functions/aemp-cloudfront-sync-function/function.py
8 3 4
def create_cache_behavior()
in lambda-functions/aemp-cloudfront-sync-function/function.py
8 1 3
def generalise_path()
in lambda-functions/aemp-cloudfront-sync-function/function.py
6 3 2