microsoft / arcticseals
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 596 units with 7,510 lines of code in units (59.5% of code).
    • 3 very long units (408 lines of code)
    • 12 long units (843 lines of code)
    • 77 medium size units (2,199 lines of code)
    • 144 small units (2,180 lines of code)
    • 360 very small units (1,880 lines of code)
5% | 11% | 29% | 29% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py3% | 10% | 29% | 30% | 26%
cs20% | 0% | 38% | 19% | 21%
cpp0% | 83% | 12% | 0% | 3%
pyx0% | 0% | 100% | 0% | 0%
h0% | 0% | 0% | 100% | 0%
js0% | 0% | 0% | 50% | 49%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
dataset-generator91% | 0% | 0% | 0% | 8%
CopyImageFiles39% | 0% | 30% | 11% | 18%
MaskRCNNDetection0% | 10% | 29% | 33% | 26%
SealDetectionRCNN0% | 16% | 30% | 28% | 24%
image_registration0% | 77% | 16% | 0% | 5%
UploadBlobs0% | 0% | 47% | 28% | 23%
archive0% | 0% | 53% | 26% | 20%
ir-normalization0% | 0% | 26% | 57% | 16%
viewer0% | 0% | 0% | 64% | 35%
parse-labels0% | 0% | 0% | 41% | 58%
utilities0% | 0% | 0% | 33% | 66%
SealDetectionAPI0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void InitializeComponent()
in src/CopyImageFiles/CopyImageFiles/Form1.Designer.cs
169 1 0
def main()
in src/dataset-generator/create_dataset_from_raw_csv.py
122 34 0
def main()
in src/dataset-generator/create_dataset_from_updated_csv.py
117 20 0
def convert_cityscapes_instance_only()
in src/MaskRCNNDetection/tools/cityscapes/convert_cityscapes_to_coco.py
91 14 2
void pre_calc_for_bilinear_interpolate()
in src/MaskRCNNDetection/maskrcnn_benchmark/csrc/cpu/ROIAlign_cpu.cpp
83 11 13
def calc_detection_voc_prec_rec()
in src/SealDetectionRCNN/utils/eval_tool.py
79 16 7
void ROIAlignForward_cpu_kernel()
in src/MaskRCNNDetection/maskrcnn_benchmark/csrc/cpu/ROIAlign_cpu.cpp
78 10 11
def computeTransform()
in src/image_registration/ir_to_rgb_registration/image_registration.py
76 25 4
def train()
in src/SealDetectionRCNN/train.py
71 15 1
def forward()
in src/SealDetectionRCNN/trainer.py
68 7 5
def registerThermalAndColorImages()
in src/image_registration/ir_to_rgb_registration/image_registration.py
67 9 4
def calc_detection_voc_prec_rec()
in src/MaskRCNNDetection/maskrcnn_benchmark/data/datasets/evaluation/voc/voc_eval.py
66 12 3
def make_data_loader()
in src/MaskRCNNDetection/maskrcnn_benchmark/data/build.py
60 9 4
def predict()
in src/SealDetectionRCNN/model/faster_rcnn.py
53 5 4
at::Tensor nms_cpu_kernel()
in src/MaskRCNNDetection/maskrcnn_benchmark/csrc/cpu/nms_cpu.cpp
51 7 3
def main()
in src/MaskRCNNDetection/tools/train_net.py
49 5 0
def __init__()
in src/SealDetectionRCNN/data/seals_dataset.py
48 23 2
def eval()
in src/SealDetectionRCNN/train.py
48 9 5
def __init__()
in src/MaskRCNNDetection/maskrcnn_benchmark/data/datasets/vott.py
45 25 4
def __init__()
in src/SealDetectionRCNN/data/vott_dataset.py
45 24 2