awslabs / aws-c-compression
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 22 units with 539 lines of code in units (62.1% of code).
    • 1 very long units (107 lines of code)
    • 2 long units (133 lines of code)
    • 5 medium size units (188 lines of code)
    • 2 small units (32 lines of code)
    • 12 very small units (79 lines of code)
19% | 24% | 34% | 5% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c19% | 24% | 34% | 5% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/huffman_generator48% | 0% | 30% | 7% | 13%
source0% | 41% | 37% | 5% | 15%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
int main()
in source/huffman_generator/generator.c
107 12 2
int huffman_test_transitive_chunked()
in source/huffman_testing.c
82 17 6
int huffman_test_transitive()
in source/huffman_testing.c
51 9 5
int aws_huffman_decode()
in source/huffman.c
47 9 3
int read_code_points()
in source/huffman_generator/generator.c
43 12 1
int aws_huffman_encode()
in source/huffman.c
43 8 3
30 7 2
void huffman_node_write_decode()
in source/huffman_generator/generator.c
25 6 3
void huffman_node_write_decode_handle_value()
in source/huffman_generator/generator.c
16 3 2
16 3 2
10 2 1
void huffman_node_clean_up()
in source/huffman_generator/generator.c
9 3 1
8 2 1
8 2 1
static size_t skip_whitespace()
in source/huffman_generator/generator.c
7 3 1
static size_t read_past_comma()
in source/huffman_generator/generator.c
7 2 1
7 1 2
void code_write()
in source/huffman_generator/generator.c
6 3 2
6 1 2
4 1 1