apple / GCGC
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 62 units with 1,002 lines of code in units (73.2% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (114 lines of code)
    • 14 medium size units (409 lines of code)
    • 18 small units (275 lines of code)
    • 28 very small units (204 lines of code)
0% | 11% | 40% | 27% | 20%
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% | 40% | 27% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/graphing0% | 15% | 33% | 31% | 19%
src0% | 0% | 60% | 15% | 23%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def plot_percentile_intervals()
in src/graphing/plotting.py
60 27 14
def plot_using_intervals()
in src/graphing/plotting.py
54 21 12
def print_summary()
in src/graphing/summary.py
42 11 5
def get_heatmap_data_logarithmic()
in src/graphing/heatmap.py
40 16 4
def arrange_into_groups()
in src/filter_and_group.py
33 14 5
def get_difference()
in src/graphing/allocation_rate.py
31 12 5
def get_colors_and_alphas()
in src/filter_and_group.py
30 4 1
def plot_frequency_of_gc_intervals()
in src/graphing/plotting.py
30 14 9
def __heatmap_make()
in src/graphing/heatmap.py
29 9 8
def plot_heatmap_logarithmic()
in src/graphing/heatmap.py
27 12 3
def get_parsed_data_from_file()
in src/read_log_file.py
27 13 2
def scale_time()
in src/read_log_file.py
26 10 1
def plot_heatmap()
in src/graphing/heatmap.py
25 11 3
def get_gc_event_tables()
in src/read_log_file.py
25 10 3
def print_percentiles()
in src/graphing/percentiles.py
23 10 4
def __create_column()
in src/read_log_file.py
21 8 3
def plot_heatmaps_logarithmic()
in src/graphing/plotting.py
20 4 9
def apply_grouping_function()
in src/graphing/plotting.py
20 7 4
def plot_heatmaps()
in src/graphing/plotting.py
19 4 8
def compare_summary()
in src/graphing/summary.py
19 12 4