aws-samples / aws-ai-ml-workshop-kr
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 218 units with 2,298 lines of code in units (18.3% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (230 lines of code)
    • 21 medium size units (670 lines of code)
    • 51 small units (733 lines of code)
    • 142 very small units (665 lines of code)
0% | 10% | 29% | 31% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 13% | 26% | 34% | 25%
js0% | 0% | 36% | 24% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
sagemaker/autogluon0% | 68% | 0% | 23% | 7%
sagemaker/tf-deploy/code0% | 59% | 0% | 12% | 28%
_archiving/src/release0% | 37% | 16% | 29% | 16%
_archiving/contribution/seongshin0% | 38% | 17% | 21% | 23%
_archiving/contribution/daekeun-ml0% | 0% | 38% | 41% | 19%
_archiving/html/AWS Korea AI ML Workshop0% | 0% | 36% | 24% | 39%
sagemaker/byoc/tensorflow_bring_your_own_kr0% | 0% | 30% | 45% | 24%
_archiving/contribution/anhyobin0% | 0% | 68% | 31% | 0%
sagemaker/tf-deploy/utils0% | 0% | 0% | 72% | 27%
sagemaker/byoc/scikit_bring_your_own0% | 0% | 0% | 57% | 42%
_archiving/src/work-in-progress0% | 0% | 0% | 100% | 0%
_archiving/contribution/jihys0% | 0% | 0% | 0% | 100%
sagemaker/byos-tensorflow/train_model0% | 0% | 0% | 0% | 100%
sagemaker/sm-pipeline/customizing_build_train_deploy_project0% | 0% | 0% | 0% | 100%
sagemaker/model-monitor0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in sagemaker/autogluon/lambda_function.py
66 2 2
def train()
in sagemaker/tf-deploy/code/train.py
62 8 1
def model_fn()
in _archiving/src/release/dev-day/mnist_hpo.py
51 7 4
def model_fn()
in _archiving/contribution/seongshin/aws-ai-ml-immersionday-kr/tensorflow_mnist/mnist.py
51 7 4
def keras_model_fn()
in _archiving/contribution/daekeun-ml/tensorflow-in-sagemaker-workshop/training_script/cifar10_keras_dist_solution.py
44 3 5
def keras_model_fn()
in _archiving/contribution/daekeun-ml/tensorflow-in-sagemaker-workshop/training_script/cifar10_keras_tensorboard_solution.py
43 3 4
def keras_model_fn()
in _archiving/contribution/daekeun-ml/tensorflow-in-sagemaker-workshop/training_script/cifar10_keras_sm_solution.py
43 3 4
def keras_model_fn()
in _archiving/contribution/daekeun-ml/tensorflow-in-sagemaker-workshop/training_script/cifar10_keras.py
43 3 4
def keras_model_fn()
in _archiving/contribution/daekeun-ml/tensorflow-in-sagemaker-workshop/training_script/cifar10_keras_pipe_solution.py
43 3 4
def model_fn()
in sagemaker/byoc/tensorflow_bring_your_own_kr/container/cifar10/cifar10.py
42 10 3
def main()
in _archiving/contribution/daekeun-ml/tensorflow-in-sagemaker-workshop/training_script/cifar10_keras_dist_solution.py
37 2 1
def cifar10_resnet_v2_generator()
in sagemaker/byoc/tensorflow_bring_your_own_kr/container/cifar10/resnet_model.py
37 5 3
jQuery()
in _archiving/html/AWS Korea AI ML Workshop/workshop/public/js/learn.js
33 8 1
function autoComplete()
in _archiving/html/AWS Korea AI ML Workshop/workshop/public/js/auto-complete.js
31 8 1
function initLunr()
in _archiving/html/AWS Korea AI ML Workshop/workshop/public/js/search.js
30 2 0
jQuery.fn.highlight = function()
in _archiving/html/AWS Korea AI ML Workshop/workshop/public/js/learn.js
30 6 2
def lambda_handler()
in _archiving/contribution/anhyobin/src/DDBInitialize.py
28 3 2
that.keydownHandler = function()
in _archiving/html/AWS Korea AI ML Workshop/workshop/public/js/auto-complete.js
27 14 1
def playlog()
in _archiving/contribution/anhyobin/src/generator.py
25 4 0
def convert_to()
in _archiving/src/release/dev-day/utils.py
23 3 3