aws-samples / aws-codepipeline-custom-job-worker-for-jfrog-artifactory
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 15 units with 188 lines of code in units (22.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (52 lines of code)
    • 6 small units (90 lines of code)
    • 7 very small units (46 lines of code)
0% | 0% | 27% | 47% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 27% | 48% | 23%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
job-worker0% | 0% | 27% | 48% | 23%
node-example0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 15 longest units
Unit# linesMcCabe index# params
def get_s3_artifact()
in job-worker/npm_job_worker.py
28 4 5
def push_to_npm()
in job-worker/npm_job_worker.py
24 3 4
def get_job_info()
in job-worker/npm_job_worker.py
18 2 1
def create_npmconfig_file()
in job-worker/npm_job_worker.py
17 2 3
def main()
in job-worker/npm_job_worker.py
17 4 0
def poll_for_jobs()
in job-worker/npm_job_worker.py
14 4 0
def unzip_codepipeline_artifact()
in job-worker/npm_job_worker.py
13 3 2
def cleanup()
in job-worker/npm_job_worker.py
11 2 2
def gen_artifactory_auth_token()
in job-worker/npm_job_worker.py
9 1 1
def job_acknowledge()
in job-worker/npm_job_worker.py
8 2 2
def signal_success()
in job-worker/npm_job_worker.py
8 2 1
def action_type()
in job-worker/npm_job_worker.py
7 1 0
def signal_failure()
in job-worker/npm_job_worker.py
7 2 2
def get_bucket_location()
in job-worker/npm_job_worker.py
5 2 2
function FakeFunction()
in node-example/index.js
2 1 0