microsoft / uf2
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 63 units with 1,213 lines of code in units (67.3% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (276 lines of code)
    • 7 medium complex units (405 lines of code)
    • 4 simple units (83 lines of code)
    • 49 very simple units (449 lines of code)
0% | 22% | 33% | 6% | 37%
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
c0% | 43% | 10% | 5% | 40%
js0% | 12% | 41% | 6% | 40%
py0% | 24% | 39% | 8% | 27%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
uf2tool0% | 49% | 12% | 6% | 32%
patcher0% | 12% | 41% | 6% | 40%
utils0% | 21% | 35% | 7% | 34%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def convert_from_uf2()
in utils/uf2conv.py
72 32 1
function readWriteConfig()
in patcher/patcher.js
75 28 2
int main()
in uf2tool/tool.c
129 26 2
function patchConfig()
in patcher/patcher.js
96 25 2
function patchHFile()
in patcher/patcher.js
91 24 2
def main()
in utils/uf2conv.py
79 20 0
function showKV()
in patcher/patcher.js
32 16 4
38 13 1
function parsePinName()
in patcher/patcher.js
37 12 2
int recv_hid()
in uf2tool/tool.c
32 11 2
def get_drives()
in utils/uf2conv.py
26 10 0
function configkeysH()
in patcher/patcher.js
26 7 0
function cmpKeys()
in patcher/patcher.js
14 6 2
void talk_hid()
in uf2tool/tool.c
17 6 4
function pinToString()
in patcher/patcher.js
16 5 2
void send_hid()
in uf2tool/tool.c
22 5 3
void verify()
in uf2tool/tool.c
23 5 4
int main()
in utils/uf2conv.c
35 5 2
def convert_to_uf2()
in utils/uf2conv.py
22 5 1
function keyWeight()
in patcher/patcher.js
9 4 1