awslabs / aws-c-cal
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 132 units with 1,687 lines of code in units (45.5% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (252 lines of code)
    • 15 medium size units (481 lines of code)
    • 32 small units (476 lines of code)
    • 81 very small units (478 lines of code)
0% | 14% | 28% | 28% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 14% | 28% | 28% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source0% | 21% | 18% | 18% | 40%
source/unix0% | 9% | 49% | 27% | 13%
source/windows0% | 20% | 15% | 36% | 28%
source/darwin0% | 0% | 15% | 50% | 33%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
71 31 2
67 19 5
57 10 1
static int s_verify_signature()
in source/windows/bcrypt_ecc.c
57 14 3
static int s_sign_message()
in source/windows/bcrypt_ecc.c
44 4 3
41 11 2
bool s_resolve_hmac_lc()
in source/unix/openssl_platform_init.c
39 10 1
bool s_resolve_hmac_111()
in source/unix/openssl_platform_init.c
37 9 1
int s_parse_cursor()
in source/der.c
36 11 2
bool s_resolve_hmac_102()
in source/unix/openssl_platform_init.c
35 8 1
bool s_resolve_md_lc()
in source/unix/openssl_platform_init.c
35 10 1
bool s_resolve_md_102()
in source/unix/openssl_platform_init.c
32 8 1
bool s_resolve_md_111()
in source/unix/openssl_platform_init.c
32 8 1
static int s_fill_in_public_key_info()
in source/unix/opensslcrypto_ecc.c
29 4 3
static int s_sign_message()
in source/darwin/securityframework_ecc.c
28 5 3
static enum aws_libcrypto_version s_resolve_libcrypto()
in source/unix/openssl_platform_init.c
26 6 1
void aws_cal_platform_init()
in source/unix/openssl_platform_init.c
23 6 1
23 4 1
21 4 5
static int s_verify_signature()
in source/darwin/securityframework_ecc.c
20 5 3