aws / aws-graviton-getting-started
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 32 units with 408 lines of code in units (77.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (94 lines of code)
    • 15 small units (235 lines of code)
    • 13 very small units (79 lines of code)
0% | 0% | 23% | 57% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 25% | 53% | 21%
c0% | 0% | 0% | 100% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
perfrunbook/utilities0% | 0% | 25% | 53% | 21%
sample-code0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def parse_data()
in perfrunbook/utilities/sar_parse.py
26 7 3
def parse_sysstat()
in perfrunbook/utilities/sar_parse.py
23 3 2
def parse_mpstat_json_single_irq()
in perfrunbook/utilities/mpstat_parse.py
23 6 2
def plot_counter_stat()
in perfrunbook/utilities/measure_and_plot_basic_pmu_counters.py
22 4 6
uint32_t arm_crc32c()
in sample-code/crc.c
19 5 3
uint32_t arm_crc32()
in sample-code/crc.c
19 5 3
def __init__()
in perfrunbook/utilities/sar_parse.py
19 2 3
def parse_mpstat_json_all_irqs()
in perfrunbook/utilities/mpstat_parse.py
19 3 1
def calc_stats_and_plot()
in perfrunbook/utilities/measure_and_plot_basic_sysstat_stats.py
18 5 4
def __init__()
in perfrunbook/utilities/sar_parse.py
17 2 3
def __init__()
in perfrunbook/utilities/sar_parse.py
17 2 3
def parse_sar()
in perfrunbook/utilities/measure_and_plot_basic_sysstat_stats.py
16 4 2
def perfstat()
in perfrunbook/utilities/measure_and_plot_basic_pmu_counters.py
16 4 4
def __init__()
in perfrunbook/utilities/sar_parse.py
15 2 3
def __init__()
in perfrunbook/utilities/sar_parse.py
15 2 3
def sar()
in perfrunbook/utilities/measure_and_plot_basic_sysstat_stats.py
12 2 1
def __init__()
in perfrunbook/utilities/sar_parse.py
11 2 3
def plot_matplotlib()
in perfrunbook/utilities/measure_and_plot_basic_sysstat_stats.py
11 1 4
def plot_matplotlib()
in perfrunbook/utilities/measure_and_plot_basic_pmu_counters.py
11 1 3
def mpstat()
in perfrunbook/utilities/measure_and_plot_basic_sysstat_stats.py
9 2 1