aws-samples / eks-workshop
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 19 units with 223 lines of code in units (3.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (43 lines of code)
    • 8 small units (126 lines of code)
    • 9 very small units (54 lines of code)
0% | 0% | 19% | 56% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 0% | 23% | 43% | 32%
py0% | 0% | 16% | 65% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
content/intermediate0% | 0% | 23% | 43% | 32%
content/advanced0% | 0% | 16% | 65% | 18%
Alternative Visuals
Longest Units
Top 19 longest units
Unit# linesMcCabe index# params
func main()
in content/intermediate/245_x-ray/sample-front.files/main.go
22 4 0
def main()
in content/advanced/420_kubeflow/kubeflow.files/inference_client.py
21 2 1
def train()
in content/advanced/420_kubeflow/kubeflow.files/mnist-tensorflow-jupyter.py
20 3 4
def train()
in content/advanced/420_kubeflow/kubeflow.files/mnist-tensorflow-docker.py
20 3 4
func main()
in content/intermediate/245_x-ray/sample-back.files/main.go
20 3 0
func backend()
in content/intermediate/245_x-ray/sample-front.files/main.go
20 4 2
def preprocessing()
in content/advanced/420_kubeflow/kubeflow.files/mnist-tensorflow-jupyter.py
12 2 0
def preprocessing()
in content/advanced/420_kubeflow/kubeflow.files/mnist-tensorflow-docker.py
12 2 0
def main()
in content/advanced/420_kubeflow/kubeflow.files/mnist-tensorflow-jupyter.py
11 2 1
def main()
in content/advanced/420_kubeflow/kubeflow.files/mnist-tensorflow-docker.py
11 2 1
def export_model()
in content/advanced/420_kubeflow/kubeflow.files/mnist-tensorflow-jupyter.py
9 2 2
def export_model()
in content/advanced/420_kubeflow/kubeflow.files/mnist-tensorflow-docker.py
9 2 2
func init()
in content/intermediate/245_x-ray/sample-back.files/main.go
6 1 0
func param()
in content/intermediate/245_x-ray/sample-back.files/main.go
6 4 3
func random()
in content/intermediate/245_x-ray/sample-back.files/main.go
6 1 1
func init()
in content/intermediate/245_x-ray/sample-front.files/main.go
6 1 0
func param()
in content/intermediate/245_x-ray/sample-front.files/main.go
6 4 3
def eval()
in content/advanced/420_kubeflow/kubeflow.files/mnist-tensorflow-jupyter.py
3 1 3
def eval()
in content/advanced/420_kubeflow/kubeflow.files/mnist-tensorflow-docker.py
3 1 3