microsoft / SymCrypt
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 399 units with 7,335 lines of code in units (8.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 15 medium complex units (911 lines of code)
    • 31 simple units (1,592 lines of code)
    • 353 very simple units (4,832 lines of code)
0% | 0% | 12% | 21% | 65%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cpp0% | 0% | 8% | 20% | 70%
cs0% | 0% | 34% | 26% | 39%
py0% | 0% | 28% | 33% | 38%
c0% | 0% | 0% | 26% | 73%
h0% | 0% | 0% | 0% | 100%
mm0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
unittest0% | 0% | 8% | 19% | 71%
scbuild0% | 0% | 34% | 26% | 39%
scripts0% | 0% | 28% | 33% | 38%
module0% | 0% | 0% | 34% | 65%
lib0% | 0% | 0% | 0% | 100%
inc0% | 0% | 0% | 0% | 100%
gen0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void CheckWriteableFiles()
in scbuild/scbuild.cs
44 22 0
VOID measurePerfOneAlg()
in unittest/lib/perf.cpp
97 18 1
void UpdateVersionNumber()
in scbuild/scbuild.cs
85 16 0
def process_file()
in scripts/symcryptasm_processor.py
39 16 5
VOID generateDlGroups()
in unittest/lib/testDh.cpp
125 16 0
def process_loadable_segments()
in scripts/process_fips_module.py
28 15 1
def gen_function_defines()
in scripts/symcryptasm_processor.py
35 15 5
VOID testRsaRunAlgs()
in unittest/lib/old-testRsa.cpp
84 15 0
public bool ProcessOptions()
in scbuild/scbuild.cs
62 14 1
57 13 1
def process_start_function()
in scripts/symcryptasm_processor.py
52 13 4
double measureDataPerfGivenStack()
in unittest/lib/perf.cpp
78 13 7
def gen_prologue_amd64_systemv()
in scripts/symcryptasm_processor.py
10 12 5
VOID rsaTestKeysGenerate()
in unittest/lib/testRsaSign.cpp
70 12 0
VOID testCompositeModInv()
in unittest/lib/testArithmetic.cpp
45 11 0
public void Build()
in scbuild/scbuild.cs
58 10 2
public void CreateGitTag()
in scbuild/scbuild.cs
37 10 1
BString katParseData()
in unittest/lib/kat.cpp
42 10 2
VOID testDlSimple()
in unittest/lib/testDh.cpp
240 10 0
public void CreateCab()
in scbuild/scbuild.cs
39 9 0