aws-samples / annotate-medical-images-in-dicom-server-and-build-ml-models-on-amazon-sagemaker
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 328 lines of code in units (13.1% of code).
    • 1 very long units (123 lines of code)
    • 2 long units (119 lines of code)
    • 0 medium size units (0 lines of code)
    • 2 small units (31 lines of code)
    • 10 very small units (55 lines of code)
37% | 36% | 0% | 9% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js52% | 22% | 0% | 6% | 18%
py0% | 71% | 0% | 15% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
DICOM-WSI/src/components54% | 22% | 0% | 7% | 15%
notebook/source0% | 71% | 0% | 15% | 12%
DICOM-WSI/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 15 longest units
Unit# linesMcCabe index# params
registerGenerateAnnotationEventListener()
in DICOM-WSI/src/components/dicompathviewer.js
123 3 0
def train()
in notebook/source/monai_dicom.py
67 10 1
function init()
in DICOM-WSI/src/components/dicompathviewer.js
52 3 0
onCheck()
in DICOM-WSI/src/components/dicompathviewer.js
16 3 2
def _get_train_data_loader()
in notebook/source/monai_dicom.py
15 2 5
registerToolClickEventListener()
in DICOM-WSI/src/components/dicompathviewer.js
10 1 0
constructor()
in DICOM-WSI/src/components/dicompathviewer.js
9 1 1
function disableToolList()
in DICOM-WSI/src/components/dicompathviewer.js
8 2 0
function App()
in DICOM-WSI/src/App.js
7 1 0
componentDidMount()
in DICOM-WSI/src/components/dicompathviewer.js
6 1 0
def __init__()
in notebook/source/monai_dicom.py
4 1 4
def save_model()
in notebook/source/monai_dicom.py
4 1 2
onExpand()
in DICOM-WSI/src/components/dicompathviewer.js
3 1 1
def __len__()
in notebook/source/monai_dicom.py
2 1 1
def __getitem__()
in notebook/source/monai_dicom.py
2 1 2