microsoft / cpprestsdk
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 2,089 units with 23,389 lines of code in units (62.6% of code).
    • 2 very complex units (813 lines of code)
    • 10 complex units (1,434 lines of code)
    • 46 medium complex units (3,121 lines of code)
    • 135 simple units (5,024 lines of code)
    • 1,896 very simple units (12,997 lines of code)
3% | 6% | 13% | 21% | 55%
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
cpp5% | 9% | 19% | 23% | 40%
h0% | 1% | 6% | 12% | 79%
hpp0% | 0% | 0% | 30% | 69%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Release/src/http6% | 12% | 16% | 25% | 39%
Release/src/utilities25% | 0% | 14% | 28% | 30%
Release/src/json0% | 16% | 23% | 8% | 52%
Release/src/uri0% | 21% | 31% | 29% | 18%
Release/include/cpprest0% | 1% | 3% | 18% | 76%
Release/src/websockets0% | 0% | 47% | 18% | 34%
Release/src/streams0% | 0% | 18% | 29% | 52%
Release/include/pplx0% | 0% | 7% | 15% | 76%
Release/src/pplx0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
datetime __cdecl datetime::from_string_maximum_error()
in Release/src/utilities/asyncrt_utils.cpp
307 97 2
static void CALLBACK completion_callback()
in Release/src/http/client/http_client_winhttp.cpp
506 82 5
static void _transfer_encoding_chunked_write_data()
in Release/src/http/client/http_client_winhttp.cpp
244 40 1
void send_request()
in Release/src/http/client/http_client_winhttp.cpp
254 39 1
bool parse_from()
in Release/src/uri/uri.cpp
115 35 1
void JSON_Parser::GetNextToken()
in Release/src/json/json_parsing.cpp
85 34 1
static bool _accept_char()
in Release/include/cpprest/streams.h
90 33 2
void start_request()
in Release/src/http/client/http_client_asio.cpp
141 32 0
bool process_buffer()
in Release/src/http/client/http_client_winhttp.cpp
128 31 4
std::unique_ptr get_compressor_from_header()
in Release/src/http/common/http_compression.cpp
128 31 3
unsigned long open()
in Release/src/http/client/http_client_winhttp.cpp
137 26 0
bool JSON_Parser::CompleteNumberLiteral()
in Release/src/json/json_parsing.cpp
112 26 2
static bool _accept_char()
in Release/include/cpprest/streams.h
63 22 2
static bool handle_authentication_failure()
in Release/src/http/client/http_client_winhttp.cpp
113 21 3
pplx::task connect_impl()
in Release/src/websockets/client/ws_client_wspp.cpp
139 21 0
virtual void send_request()
in Release/src/http/client/http_client_winrt.cpp
136 20 1
size_t compress()
in Release/src/http/common/http_compression.cpp
66 19 7
std::unique_ptr get_decompressor_from_header()
in Release/src/http/common/http_compression.cpp
77 19 3
will_deref_and_erase_t asio_server_connection::handle_http_line()
in Release/src/http/listener/http_server_asio.cpp
106 19 1
void read_headers()
in Release/src/http/client/http_client_asio.cpp
76 18 0