microsoft / cpp_client_telemetry
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 11,793 units with 315,028 lines of code in units (70.4% of code).
    • 83 very complex units (89,116 lines of code)
    • 263 complex units (32,403 lines of code)
    • 1,025 medium complex units (61,091 lines of code)
    • 1,431 simple units (43,869 lines of code)
    • 8,991 very simple units (88,549 lines of code)
28% | 10% | 19% | 13% | 28%
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
c32% | 11% | 20% | 13% | 22%
hpp13% | 16% | 9% | 10% | 50%
cpp2% | 2% | 20% | 21% | 53%
py2% | 10% | 20% | 22% | 44%
cc0% | 0% | 13% | 17% | 68%
java0% | 0% | 9% | 18% | 71%
h0% | 0% | 1% | 8% | 90%
cs0% | 0% | 7% | 26% | 66%
mm0% | 0% | 18% | 0% | 81%
pas0% | 0% | 0% | 31% | 68%
js0% | 0% | 0% | 0% | 100%
go0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
sqlite33% | 10% | 20% | 13% | 22%
zlib15% | 17% | 25% | 16% | 25%
lib6% | 7% | 14% | 15% | 54%
googletest<1% | 2% | 11% | 15% | 69%
tools0% | 6% | 6% | 41% | 46%
wrappers0% | 0% | 0% | 0% | 100%
Solutions0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static void decodeIntArray()
in sqlite/sqlite3_debug.c
27235 5943 5
static void decodeIntArray()
in sqlite/sqlite3_retail.c
27207 5943 5
SQLITE_PRIVATE int sqlite3VdbeExec()
in sqlite/sqlite3_debug.c
4321 1122 1
SQLITE_PRIVATE int sqlite3VdbeExec()
in sqlite/sqlite3_retail.c
4321 1122 1
2706 805 2
static YYACTIONTYPE yy_reduce()
in sqlite/sqlite3_debug.c
1991 523 4
static YYACTIONTYPE yy_reduce()
in sqlite/sqlite3_retail.c
1483 523 4
bool parse_msgpack_internal()
in lib/include/mat/json.hpp
339 273 0
bool parse_cbor_internal()
in lib/include/mat/json.hpp
382 233 2
token_type scan_string()
in lib/include/mat/json.hpp
488 212 0
628 202 3
628 202 3
int ZEXPORT inflate()
in zlib/inflate.c
637 202 2
603 180 3
603 180 3
360 172 5
static int keywordCode()
in sqlite/sqlite3_debug.c
172 158 3
static int keywordCode()
in sqlite/sqlite3_retail.c
172 158 3
int SQLITE_CDECL wmain()
in sqlite/shell.c
465 142 2
static int balance_nonroot()
in sqlite/sqlite3_debug.c
498 142 5