microsoft / TPM-2.0-Parser
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 1,611 units with 13,039 lines of code in units (49.5% of code).
    • 3 very long units (480 lines of code)
    • 13 long units (848 lines of code)
    • 57 medium size units (1,590 lines of code)
    • 193 small units (2,676 lines of code)
    • 1,345 very small units (7,445 lines of code)
3% | 6% | 12% | 20% | 57%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs3% | 6% | 12% | 20% | 57%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
TPM Parser/Tpm2Lib3% | 6% | 10% | 19% | 58%
TPM Parser/Controls0% | 15% | 34% | 27% | 23%
TPM Parser0% | 0% | 34% | 40% | 24%
TPM Parser/Views0% | 0% | 13% | 29% | 56%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void UpdateHandleData()
in TPM Parser/Tpm2Lib/Tpm2.cs
183 31 4
Type UnionElementFromSelector()
in TPM Parser/Tpm2Lib/X_TpmDefs.cs
176 99 2
public static string CleanHex()
in TPM Parser/Tpm2Lib/Tpm2.cs
121 30 1
public static AsymCryptoSystem CreateFrom()
in TPM Parser/Tpm2Lib/CryptoAsym.cs
92 15 2
public static bool CrackCommand()
in TPM Parser/Tpm2Lib/Tpm2.cs
89 15 5
public static string ParseResponse()
in TPM Parser/Tpm2Lib/Tpm2.cs
78 11 2
public void PutInternal()
in TPM Parser/Tpm2Lib/Marshaller.cs
75 15 2
protected override void OnKeyDown()
in TPM Parser/Controls/NavMenuListView.cs
67 14 1
internal void Print()
in TPM Parser/Tpm2Lib/SupportClasses.cs
64 9 3
internal virtual void ToHost()
in TPM Parser/Tpm2Lib/TpmBaseClasses.cs
59 11 1
public static void SplitResponse()
in TPM Parser/Tpm2Lib/Tpm2.cs
56 5 9
private bool VerifySignature()
in TPM Parser/Tpm2Lib/CryptoAsym.cs
55 13 4
private void AddLine()
in TPM Parser/Tpm2Lib/SupportClasses.cs
55 10 3
public TpmPrivate GetDuplicationBlob()
in TPM Parser/Tpm2Lib/TpmKey.cs
55 4 3
public static SymmCipher Create()
in TPM Parser/Tpm2Lib/CryptoSymm.cs
52 11 3
public ISignatureUnion SignData()
in TPM Parser/Tpm2Lib/CryptoAsym.cs
51 8 2
public static string GetErrorString()
in TPM Parser/Tpm2Lib/Tpm2.cs
49 6 3
public static bool PssVerify()
in TPM Parser/Tpm2Lib/CryptoLib.cs
47 8 5
public bool VerifyQuote()
in TPM Parser/Tpm2Lib/TpmKey.cs
47 9 7
public static bool OaepDecode()
in TPM Parser/Tpm2Lib/CryptoLib.cs
45 7 4