awslabs / aws-nitro-enclaves-cose
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 62 units with 1,069 lines of code in units (63.1% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (104 lines of code)
    • 17 medium size units (525 lines of code)
    • 19 small units (268 lines of code)
    • 24 very small units (172 lines of code)
0% | 9% | 49% | 25% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rs0% | 9% | 49% | 25% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 5% | 52% | 25% | 16%
src/crypto0% | 29% | 31% | 22% | 16%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
53 1 0
fn public_to_parameters()
in src/crypto/tpm.rs
51 1 1
fn cose_sign_tpm()
in src/sign.rs
50 1 0
fn deserialize()
in src/sign.rs
49 2 1
48 1 0
fn sign()
in src/crypto/tpm.rs
33 1 2
30 1 0
30 1 0
28 1 0
28 1 0
27 1 0
27 1 0
27 1 0
26 1 0
26 1 0
26 1 0
25 1 0
24 1 0
fn verify()
in src/crypto/tpm.rs
21 1 3
19 1 0