microsoft / lsvmtools
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 902 units with 25,899 lines of code in units (58.5% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (864 lines of code)
    • 124 medium complex units (9,142 lines of code)
    • 194 simple units (7,218 lines of code)
    • 579 very simple units (8,675 lines of code)
0% | 3% | 35% | 27% | 33%
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% | 3% | 35% | 28% | 32%
h0% | 0% | 0% | 8% | 91%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lsvmutils0% | 2% | 39% | 26% | 31%
lsvmload0% | 6% | 39% | 21% | 32%
lsvmtool0% | 3% | 23% | 37% | 36%
striplic0% | 0% | 42% | 44% | 13%
posix0% | 0% | 0% | 22% | 77%
posix/include0% | 0% | 0% | 36% | 63%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
EFI_STATUS efi_main()
in lsvmload/main.c
254 38 2
static int _ResolveInitrd()
in lsvmutils/grubcfg.c
129 33 5
int VFATInit()
in lsvmutils/vfat.c
136 30 2
int ext2_main()
in lsvmtool/ext2main.c
161 27 2
EXT2Err EXT2Rm()
in lsvmutils/ext2.c
184 27 2
int InitrdInjectFiles()
in lsvmutils/initrd.c
96 25 8
int LoadPolicy()
in lsvmutils/policy.c
122 25 3
int _PutFile()
in lsvmutils/vfat.c
142 25 5
static int _InjectFiles()
in lsvmutils/initrd.c
177 24 8
int InitrdInjectFiles()
in lsvmutils/initrd.c
120 24 8
106 23 4
int LoadEFIVar()
in lsvmutils/measure.c
119 22 4
static int _crypt_command()
in lsvmtool/lsvmtoolmain.c
164 21 3
int GrubcfgFindInitrdPaths()
in lsvmutils/grubcfg.c
64 21 3
int ParseConf()
in lsvmutils/conf.c
97 20 6
EXT2Err EXT2Check()
in lsvmutils/ext2.c
104 20 1
static int _GetToken()
in lsvmutils/grubcfg.c
64 20 2
typedef EFI_STATUS()
in lsvmload/image.c
108 19 1
int vfat_main()
in lsvmtool/vfatmain.c
92 19 2
EXT2Err EXT2HashDir()
in lsvmutils/ext2.c
73 19 4