microsoft / uprove-csharp-sdk
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 353 units with 6,190 lines of code in units (32.8% of code).
    • 4 very long units (1,035 lines of code)
    • 14 long units (912 lines of code)
    • 68 medium size units (2,067 lines of code)
    • 67 small units (1,020 lines of code)
    • 200 very small units (1,156 lines of code)
16% | 14% | 33% | 16% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs16% | 14% | 33% | 16% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
UProveTestVectors60% | 14% | 7% | 3% | 13%
UProveCrypto12% | 9% | 35% | 15% | 27%
UProveUnitTest7% | 24% | 45% | 18% | 3%
UProveParams0% | 22% | 34% | 29% | 13%
UProveCrypto/Math0% | 9% | 30% | 26% | 33%
UProveSample0% | 0% | 76% | 0% | 23%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
internal static void GenerateTestVectors()
in UProveTestVectors/TestVectors.cs
612 84 7
internal static PresentationProof Generate()
in UProveCrypto/PresentationProof.cs
176 36 12
public void Verify()
in UProveCrypto/PresentationProof.cs
134 27 8
public void TestEndToEnd()
in UProveUnitTest/EndToEndTest.cs
113 20 0
public static GroupElement VerifyProof()
in UProveCrypto/CollaborativeIssuance.cs
88 9 3
public static PreIssuanceProof CreateProof()
in UProveCrypto/CollaborativeIssuance.cs
87 14 3
static void Main()
in UProveTestVectors/Program.cs
86 14 1
public void TestRecommendedParameters()
in UProveUnitTest/RecommendedParametersTest.cs
77 7 0
public void VerifySubgroupGroupTest()
in UProveUnitTest/GroupTest.cs
74 9 0
public static void Hash()
in UProveTestVectors/ProtocolHelper.cs
64 14 2
public void LongTest()
in UProveUnitTest/EndToEndTest.cs
59 5 0
public override GroupElement DeriveElement()
in UProveCrypto/Math/bc/SubgroupGroupBCImpl.cs
56 9 3
public void PseudonymAndCommitmentsTest()
in UProveUnitTest/EndToEndTest.cs
56 7 0
static void Main()
in UProveParams/Program.cs
55 9 1
public virtual void Validate()
in UProveCrypto/CollaborativeIssuance.cs
54 19 0
private void RunFuzzedTest()
in UProveUnitTest/EndToEndTest.cs
54 5 8
public static BigInteger FIPS_186_3_AnnexA_2_3()
in UProveParams/SubgroupRecommendedParameters.cs
51 8 6
public void CollaborativeIssuanceTestFull()
in UProveUnitTest/CollaborativeIssuanceTests.cs
51 4 0
public void FuzzTest()
in UProveUnitTest/EndToEndTest.cs
50 11 0
internal void OnDeserialized()
in UProveCrypto/IssuerParameters.cs
48 11 1