awslabs / kubeflow-manifests
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 17 units with 839 lines of code in units (0.8% of code).
    • 3 very long units (608 lines of code)
    • 1 long units (61 lines of code)
    • 2 medium size units (56 lines of code)
    • 5 small units (70 lines of code)
    • 6 very small units (44 lines of code)
72% | 7% | 6% | 8% | 5%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py72% | 7% | 6% | 8% | 5%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
apps/pipeline96% | 0% | 0% | 0% | 3%
apps/kfp-tekton96% | 0% | 0% | 0% | 3%
hack39% | 17% | 15% | 19% | 7%
Alternative Visuals
Longest Units
Top 17 longest units
Unit# linesMcCabe index# params
def sync()
in apps/pipeline/upstream/base/installs/multi-user/pipelines-profile-controller/sync.py
233 13 3
def sync()
in apps/kfp-tekton/upstream/base/installs/multi-user/pipelines-profile-controller/sync.py
233 13 3
def create_subst()
in hack/create_kptfile.py
142 21 1
def generate()
in hack/generate_legacy_kustomizations.py
61 16 2
def write_gcp_kpt()
in hack/generate_gcp_kpt_data.py
31 6 1
def run()
in hack/build_kfdef_specs.py
25 6 0
def strip_comments()
in hack/create_kptfile.py
20 6 1
def create_subst_mgmt()
in hack/create_kptfile.py
15 1 1
def create_subst_asm()
in hack/create_kptfile.py
13 1 1
def create_subst_stacks()
in hack/create_kptfile.py
11 1 1
def build_configmap_generators()
in hack/generate_legacy_kustomizations.py
11 4 1
def create_subst_private()
in hack/create_kptfile.py
9 2 1
def do_POST()
in apps/pipeline/upstream/base/installs/multi-user/pipelines-profile-controller/sync.py
8 1 1
def do_POST()
in apps/kfp-tekton/upstream/base/installs/multi-user/pipelines-profile-controller/sync.py
8 1 1
def create_setter()
in hack/create_kptfile.py
7 2 4
def create_subst()
in hack/create_kptfile.py
6 1 4
def restore()
in hack/create_kptfile.py
6 2 0