aws / aws-encryption-sdk-javascript
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 327 units with 5,018 lines of code in units (41.0% of code).
    • 0 very long units (0 lines of code)
    • 13 long units (827 lines of code)
    • 62 medium size units (2,104 lines of code)
    • 76 small units (1,098 lines of code)
    • 176 very small units (989 lines of code)
0% | 16% | 41% | 21% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 16% | 41% | 21% | 19%
js0% | 0% | 77% | 22% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
modules/example-browser0% | 39% | 46% | 10% | 3%
modules/kms-keyring0% | 25% | 36% | 23% | 13%
modules/integration-browser0% | 38% | 29% | 14% | 17%
modules/decrypt-node0% | 42% | 22% | 18% | 17%
modules/raw-rsa-keyring-browser0% | 45% | 10% | 22% | 20%
modules/raw-rsa-keyring-node0% | 85% | 0% | 0% | 15%
modules/integration-vectors0% | 32% | 40% | 17% | 9%
modules/serialize0% | 8% | 42% | 30% | 18%
modules/example-node0% | 0% | 68% | 19% | 11%
modules/material-management-browser0% | 0% | 68% | 14% | 16%
modules/material-management0% | 0% | 33% | 34% | 32%
modules/cache-material0% | 0% | 58% | 5% | 36%
modules/raw-aes-keyring-browser0% | 0% | 81% | 11% | 7%
modules/encrypt-node0% | 0% | 53% | 20% | 25%
modules/raw-aes-keyring-node0% | 0% | 89% | 0% | 10%
ROOT0% | 0% | 77% | 22% | 0%
modules/web-crypto-backend0% | 0% | 25% | 46% | 27%
modules/decrypt-browser0% | 0% | 74% | 0% | 25%
modules/material-management-node0% | 0% | 25% | 54% | 20%
modules/raw-keyring0% | 0% | 40% | 20% | 38%
modules/integration-node0% | 0% | 0% | 40% | 59%
modules/caching-materials-manager-browser0% | 0% | 0% | 100% | 0%
modules/kms-keyring-node0% | 0% | 0% | 100% | 0%
modules/caching-materials-manager-node0% | 0% | 0% | 100% | 0%
modules/kms-keyring-browser0% | 0% | 0% | 0% | 100%
modules/hkdf-node0% | 0% | 0% | 0% | 100%
modules/client-browser0% | 0% | 0% | 0% | 100%
modules/client-node0% | 0% | 0% | 0% | 100%
modules/encrypt-browser0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
let pathologicalDrain:()
in modules/decrypt-node/src/decipher_stream.ts
93 9 1
constructor()
in modules/raw-rsa-keyring-browser/src/raw_rsa_keyring_web_crypto.ts
89 7 1
export async function buildDecryptFixtures()
in modules/integration-browser/src/build_decrypt_fixtures.ts
74 17 4
constructor()
in modules/raw-rsa-keyring-node/src/raw_rsa_keyring_node.ts
68 8 1
export async function testMultiKeyringExample()
in modules/example-browser/src/multi_keyring.ts
62 2 0
export async function testRSA()
in modules/example-browser/src/rsa_simple.ts
61 2 0
async _onDecrypt()
in modules/kms-keyring/src/kms_mrk_discovery_keyring.ts
57 7 2
async _onEncrypt()
in modules/kms-keyring/src/kms_mrk_keyring.ts
57 2 1
export async function testCachingCMMExample()
in modules/example-browser/src/caching_cmm.ts
55 2 0
export async function buildEncryptFixtures()
in modules/integration-browser/src/build_encrypt_fixtures.ts
53 10 5
async _onEncrypt()
in modules/kms-keyring/src/kms_keyring.ts
53 8 1
export async function _getDecryptTestVectorIterator()
in modules/integration-vectors/src/get_decrypt_test_iterator.ts
53 14 1
export function deserializeEncryptedDataKeysFactory()
in modules/serialize/src/deserialize_encrypted_data_keys.ts
52 6 1
export function getEncryptionMaterials()
in modules/cache-material/src/caching_cryptographic_materials_decorators.ts
50 9 2
constructor()
in modules/decrypt-node/src/verify_stream.ts
49 5 1
export function cloneMaterial()
in modules/material-management/src/clone_cryptographic_material.ts
48 15 1
async _onDecrypt()
in modules/kms-keyring/src/kms_keyring.ts
47 7 2
async _onDecrypt()
in modules/kms-keyring/src/kms_mrk_keyring.ts
47 5 2
export async function testFallback()
in modules/example-browser/src/fallback.ts
47 2 0
constructor()
in modules/raw-aes-keyring-node/src/raw_aes_keyring_node.ts
47 2 1