awslabs / aws-c-auth
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 256 units with 5,638 lines of code in units (59.0% of code).
    • 1 very long units (113 lines of code)
    • 24 long units (1,649 lines of code)
    • 66 medium size units (2,061 lines of code)
    • 79 small units (1,233 lines of code)
    • 86 very small units (582 lines of code)
2% | 29% | 36% | 21% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c2% | 29% | 36% | 21% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source2% | 29% | 36% | 21% | 10%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
113 24 1
static int s_parse_instance_info()
in source/aws_imds_client.c
96 33 2
static void s_on_stream_complete_fn()
in source/credentials_provider_sts.c
95 21 3
int aws_verify_sigv4a_signing()
in source/aws_signing.c
84 14 7
83 16 3
static void s_start_make_request()
in source/credentials_provider_sts.c
80 14 2
static int s_make_ecs_http_query()
in source/credentials_provider_ecs.c
77 12 2
77 15 2
77 19 2
static int s_make_sts_web_identity_http_query()
in source/credentials_provider_sts_web_identity.c
75 14 2
static int s_make_x509_http_query()
in source/credentials_provider_x509.c
75 11 2
74 7 3
68 17 1
static int s_make_imds_http_query()
in source/aws_imds_client.c
67 11 5
61 17 1
61 20 3
static int s_build_request_uri()
in source/sigv4_http_request.c
61 9 3
static int s_get_credentials_from_process()
in source/credentials_provider_process.c
60 8 3
58 9 1
57 9 3