opensearch-project / opensearch-build
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 380 units with 2,663 lines of code in units (47.9% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (116 lines of code)
    • 19 medium size units (570 lines of code)
    • 33 small units (473 lines of code)
    • 326 very small units (1,504 lines of code)
0% | 4% | 21% | 17% | 56%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
groovy0% | 15% | 36% | 30% | 17%
ts0% | 43% | 44% | 0% | 11%
py0% | 0% | 17% | 16% | 66%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
vars0% | 15% | 36% | 30% | 17%
deployment/lib0% | 43% | 44% | 0% | 11%
src0% | 0% | 73% | 22% | 3%
src/ci_workflow0% | 0% | 31% | 8% | 60%
src/build_workflow0% | 0% | 23% | 26% | 50%
src/manifests_workflow0% | 0% | 29% | 13% | 57%
src/system0% | 0% | 12% | 5% | 82%
src/assemble_workflow0% | 0% | 8% | 32% | 59%
src/manifests0% | 0% | 0% | 5% | 94%
src/checkout_workflow0% | 0% | 0% | 100% | 0%
src/paths0% | 0% | 0% | 22% | 77%
src/sign_workflow0% | 0% | 0% | 14% | 85%
src/git0% | 0% | 0% | 21% | 78%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
void call()
in vars/promoteArtifacts.groovy
65 7 1
constructor()
in deployment/lib/artifacts-public-access.ts
51 3 3
def __init__()
in src/build_workflow/build_args.py
46 2 1
def update()
in src/manifests_workflow/input_manifests.py
44 12 4
def main()
in src/run_build.py
42 8 0
void call()
in vars/buildDockerImage.groovy
42 3 1
def __init__()
in src/ci_workflow/ci_args.py
33 1 1
Map call()
in vars/getManifestSHA.groovy
32 2 1
void call()
in vars/uploadArtifacts.groovy
30 1 1
constructor()
in deployment/lib/identities.ts
30 4 2
def __init__()
in src/manifests_workflow/manifests_args.py
29 1 1
def check()
in src/build_workflow/opensearch/build_artifact_check_maven.py
28 4 2
def __get_dependencies()
in src/ci_workflow/ci_check_gradle_dependencies.py
28 7 1
Closure call()
in vars/createSha512Checksums.groovy
26 6 0
def terminate()
in src/system/process.py
25 6 1
def __init__()
in src/assemble_workflow/assemble_args.py
24 1 1
def main()
in src/run_sign.py
23 1 0
def main()
in src/run_assemble.py
23 1 0
void call()
in vars/copyDockerImage.groovy
22 4 1
constructor()
in deployment/lib/build-artifact-stack.ts
22 2 3