aws / aws-encryption-sdk-c
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 588 units with 9,811 lines of code in units (59.0% of code).
    • 5 very long units (586 lines of code)
    • 22 long units (1,401 lines of code)
    • 120 medium size units (3,755 lines of code)
    • 168 small units (2,382 lines of code)
    • 273 very small units (1,687 lines of code)
5% | 14% | 38% | 24% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp48% | 10% | 10% | 19% | 12%
c2% | 15% | 42% | 23% | 16%
py0% | 0% | 100% | 0% | 0%
h0% | 0% | 0% | 55% | 44%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
aws-encryption-sdk-cpp/source48% | 10% | 10% | 19% | 11%
source4% | 22% | 40% | 20% | 11%
verification/cbmc0% | 5% | 44% | 27% | 22%
include/aws0% | 0% | 0% | 55% | 44%
cmake/header-tester0% | 0% | 0% | 0% | 100%
codebuild/test-install-project0% | 0% | 0% | 0% | 100%
codebuild/test-install-project-cpp0% | 0% | 0% | 0% | 100%
aws-encryption-sdk-cpp/include0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static int OnDecrypt()
in aws-encryption-sdk-cpp/source/kms_mrk_keyring.cpp
127 30 7
static int OnEncrypt()
in aws-encryption-sdk-cpp/source/kms_mrk_keyring.cpp
127 24 7
static int OnEncrypt()
in aws-encryption-sdk-cpp/source/kms_keyring.cpp
117 23 7
int aws_cryptosdk_sig_sign_start()
in source/cipher_openssl.c
112 33 5
int aws_cryptosdk_sig_sign_finish()
in source/cipher_openssl.c
103 22 3
99 39 2
static int OnDecrypt()
in aws-encryption-sdk-cpp/source/kms_keyring.cpp
80 19 7
int aws_cryptosdk_priv_try_gen_key()
in source/session_encrypt.c
77 18 1
77 13 3
int hash_dec_request()
in source/caching_cmm.c
74 21 3
74 29 4
67 22 7
int aws_cryptosdk_sig_get_privkey()
in source/cipher_openssl.c
66 13 3
static int sign_header()
in source/session_encrypt.c
65 16 1
62 18 9
int on_encrypt()
in verification/cbmc/proofs/aws_cryptosdk_keyring_on_encrypt/aws_cryptosdk_keyring_on_encrypt_harness.c
62 6 7
60 15 4
60 18 3
55 11 3
static int raw_aes_keyring_on_decrypt()
in source/raw_aes_keyring.c
55 12 7