microsoft / libHttpClient
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 1,066 units with 16,081 lines of code in units (33.9% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (896 lines of code)
    • 28 medium complex units (1,994 lines of code)
    • 95 simple units (3,906 lines of code)
    • 939 very simple units (9,285 lines of code)
0% | 5% | 12% | 24% | 57%
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
h0% | 30% | 5% | 1% | 62%
cpp0% | 2% | 13% | 27% | 56%
hpp0% | 4% | 13% | 23% | 59%
cs0% | 0% | 11% | 62% | 25%
mm0% | 0% | 0% | 33% | 66%
java0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Source/Task0% | 17% | 7% | 15% | 59%
Source/WebSocket0% | 10% | 13% | 29% | 45%
Include/json_cpp0% | 3% | 12% | 21% | 62%
Source/HTTP0% | 0% | 18% | 27% | 54%
Source/Common0% | 0% | 15% | 30% | 54%
Utilities/CMake0% | 0% | 11% | 62% | 25%
Source/Global0% | 0% | 0% | 29% | 70%
Source/Mock0% | 0% | 0% | 39% | 60%
Source/Logger0% | 0% | 0% | 11% | 88%
Build/libHttpClient.Android0% | 0% | 0% | 0% | 100%
Include/httpClient0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
class alignas()
in Source/Task/LocklessQueue.h
477 48 1
void JSON_Parser::GetNextToken()
in Include/json_cpp/details/json_parsing.hpp
90 34 1
HRESULT connect_impl()
in Source/WebSocket/Websocketpp/websocketpp_websocket.cpp
214 29 1
bool JSON_Parser::CompleteNumberLiteral()
in Include/json_cpp/details/json_parsing.hpp
115 26 2
datetime __cdecl datetime::from_string()
in Include/json_cpp/details/asyncrt_utils.hpp
167 23 2
bool HexDecode()
in Source/Common/utils.h
37 23 2
bool http_call_should_retry()
in Source/HTTP/httpcall.cpp
86 22 2
void CALLBACK WinHttpConnection::completion_callback()
in Source/HTTP/WinHttp/winhttp_connection.cpp
133 20 5
HRESULT WinHttpConnection::Initialize()
in Source/HTTP/WinHttp/winhttp_connection.cpp
127 19 0
bool Uri::ParseHost()
in Source/Common/uri.cpp
57 17 2
char HexEncode()
in Source/Common/utils.h
27 17 1
void xmlhttp_http_task::perform_async()
in Source/HTTP/XMLHttp/xmlhttp_http_task.cpp
138 17 2
HRESULT Initialize()
in Source/Task/ThreadPool_stl.cpp
86 17 2
std::unique_ptr JSON_Parser::_ParseObject()
in Include/json_cpp/details/json_parsing.hpp
59 15 1
HRESULT WebsocketConnectDoWork()
in Source/WebSocket/WinRT/winrt_websocket.cpp
113 15 2
utility::string_t datetime::to_string()
in Include/json_cpp/details/asyncrt_utils.hpp
106 14 1
void retry_http_call_until_done()
in Source/HTTP/httpcall.cpp
86 14 1
bool __stdcall TaskQueuePortImpl::Wait()
in Source/Task/TaskQueue.cpp
52 14 2
HRESULT HC_WEBSOCKET::Connect()
in Source/WebSocket/hcwebsocket.cpp
106 14 3
inline bool JSON_Parser::handle_unescape_char()
in Include/json_cpp/details/json_parsing.hpp
57 13 1