facebookresearch / URL-Sanitization
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 21 units with 456 lines of code in units (92.9% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (54 lines of code)
    • 8 medium size units (275 lines of code)
    • 6 small units (92 lines of code)
    • 6 very small units (35 lines of code)
0% | 11% | 60% | 20% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 11% | 60% | 20% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
modules0% | 11% | 60% | 20% | 7%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def process_multiple_urls()
in modules/url_comparison.py
54 9 2
def read_and_soup()
in modules/url_content_fetcher.py
47 2 1
def drop_params_via_similarity()
in modules/url_parameters_removal.py
39 7 6
def compare_two_soups()
in modules/url_comparison.py
37 3 3
def process_urls()
in modules/process_urls.py
37 3 4
def build_param_data()
in modules/url_parameters_removal.py
32 1 1
def drop_query_params()
in modules/url_parameters_removal.py
31 4 1
def append_url_similarity()
in modules/url_parameters_removal.py
26 6 2
def remove_pii_params()
in modules/url_parameters_removal.py
26 8 3
def __init__()
in modules/url_parameters_removal.py
18 2 9
def parse_urls_for_param()
in modules/url_parameters_removal.py
18 3 1
def __init__()
in modules/url_comparison.py
16 2 8
def process_one_url()
in modules/url_comparison.py
15 5 2
def generate_modified_urls()
in modules/url_comparison.py
13 3 2
def process_one_url_empty_result()
in modules/url_comparison.py
12 1 3
def _qp_no_phone()
in modules/url_parameters_removal.py
9 3 2
def __init__()
in modules/url_content_fetcher.py
9 1 5
def get_body()
in modules/url_content_fetcher.py
6 4 1
def get_title()
in modules/url_content_fetcher.py
6 4 1
def _check_ph_num()
in modules/url_parameters_removal.py
3 2 2