microsoft / Azure-DCAP-Client
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 109 units with 2,113 lines of code in units (50.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (102 lines of code)
    • 18 simple units (756 lines of code)
    • 89 very simple units (1,255 lines of code)
0% | 0% | 4% | 35% | 59%
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% | 4% | 34% | 60%
h0% | 0% | 0% | 71% | 28%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Linux0% | 0% | 13% | 21% | 65%
src/Windows0% | 0% | 7% | 47% | 45%
src0% | 0% | 0% | 30% | 69%
src/Windows/dll0% | 0% | 0% | 86% | 13%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
size_t curl_easy::header_callback()
in src/Linux/curl_easy.cpp
61 17 4
std::string curl_easy::escape()
in src/Windows/curl_easy.cpp
41 15 2
static int delete_path()
in src/Linux/local_cache.cpp
30 9 4
71 9 6
void log_message()
in src/logging.cpp
39 9 2
std::unique_ptr curl_easy::create()
in src/Windows/curl_easy.cpp
94 8 3
std::unique_ptr curl_easy::create()
in src/Linux/curl_easy.cpp
39 7 3
int8_t Int8FromHexAscii()
in src/Windows/curl_easy.cpp
21 7 1
std::string curl_easy::unescape()
in src/Windows/curl_easy.cpp
49 7 1
DWORD check_install_event_log_source()
in src/Windows/dll/evtx_logging.cpp
65 7 0
static std::wstring sha256()
in src/Windows/local_cache.cpp
75 7 2
34 7 1
29 7 2
19 7 2
static void init_callback()
in src/Linux/local_cache.cpp
27 6 0
bool log_event_log_message()
in src/Windows/dll/evtx_logging.cpp
35 6 2
wil::unique_hfile OpenHandle()
in src/Windows/local_cache.cpp
20 6 7
45 6 3
18 6 1
46 6 1