facebookresearch / ActivityNet-Entities
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 14 units with 542 lines of code in units (81.7% of code).
    • 1 very long units (137 lines of code)
    • 3 long units (199 lines of code)
    • 4 medium size units (149 lines of code)
    • 3 small units (39 lines of code)
    • 3 very small units (18 lines of code)
25% | 36% | 27% | 7% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py25% | 36% | 27% | 7% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
scripts25% | 36% | 27% | 7% | 3%
Alternative Visuals
Longest Units
Top 14 longest units
Unit# linesMcCabe index# params
def prep_all()
in scripts/attr_prep_tag_NP.py
137 32 5
def precision_recall_util()
in scripts/eval_grd_anet_entities.py
85 35 2
def bbox_overlaps_batch()
in scripts/utils.py
62 2 3
def grd_eval()
in scripts/eval_grd_anet_entities.py
52 21 2
def gt_grd_eval()
in scripts/eval_grd_anet_entities.py
44 15 1
def freq_obj_list()
in scripts/attr_prep_tag_NP.py
42 11 3
def extract_attr()
in scripts/attr_prep_tag_NP.py
32 16 2
def main()
in scripts/attr_prep_tag_NP.py
31 2 1
def define_split()
in scripts/attr_prep_tag_NP.py
16 5 1
def main()
in scripts/eval_grd_anet_entities.py
12 3 1
def __init__()
in scripts/eval_grd_anet_entities.py
11 3 7
def import_ref()
in scripts/eval_grd_anet_entities.py
10 5 3
def import_sub()
in scripts/eval_grd_anet_entities.py
4 1 2
def get_frm_mask()
in scripts/utils.py
4 1 2