microsoft / cppgraphqlgen
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 601 units with 10,595 lines of code in units (57.5% of code).
    • 2 very complex units (1,126 lines of code)
    • 5 complex units (1,121 lines of code)
    • 27 medium complex units (2,168 lines of code)
    • 37 simple units (1,403 lines of code)
    • 530 very simple units (4,777 lines of code)
10% | 10% | 20% | 13% | 45%
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
cpp11% | 11% | 21% | 13% | 41%
h0% | 0% | 8% | 5% | 85%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src12% | 12% | 22% | 14% | 38%
include/graphqlservice0% | 0% | 18% | 8% | 73%
src/introspection0% | 0% | 2% | 8% | 89%
include/graphqlservice/internal0% | 0% | 0% | 2% | 97%
include/graphqlservice/introspection0% | 0% | 0% | 0% | 100%
include0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
874 105 3
252 51 3
bool Generator::outputHeader()
in src/SchemaGenerator.cpp
301 47 0
249 33 3
246 31 0
199 29 1
126 27 0
131 25 2
bool Generator::outputSource()
in src/ClientGenerator.cpp
194 24 0
int main()
in src/ClientGenerator.cpp
153 23 2
150 23 1
116 21 0
118 21 4
75 20 1
71 16 1
53 15 1
86 15 1
50 14 1
75 13 3
67 13 3