awslabs / aws-c-event-stream
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 120 units with 2,842 lines of code in units (72.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 10 medium complex units (1,050 lines of code)
    • 9 simple units (411 lines of code)
    • 101 very simple units (1,381 lines of code)
0% | 0% | 36% | 14% | 48%
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
c0% | 0% | 36% | 14% | 48%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source0% | 0% | 36% | 14% | 48%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
67 19 5
static void s_route_message_by_type()
in source/event_stream_rpc_server.c
205 19 7
static int s_send_protocol_message()
in source/event_stream_rpc_client.c
146 15 7
51 14 2
66 14 3
84 13 2
static int s_read_header_type()
in source/event_stream.c
59 13 4
static int s_process_read_message()
in source/event_stream_channel_handler.c
146 13 3
static int s_send_protocol_message()
in source/event_stream_rpc_server.c
121 12 6
static void s_route_message_by_type()
in source/event_stream_rpc_client.c
105 12 6
static int s_headers_state()
in source/event_stream.c
54 10 4
int aws_event_stream_message_init()
in source/event_stream.c
45 9 4
21 8 1
38 7 3
static void s_on_accept_channel_setup()
in source/event_stream_rpc_server.c
50 7 4
static void s_write_handler_message()
in source/event_stream_channel_handler.c
61 6 3
static void s_on_protocol_message_written_fn()
in source/event_stream_rpc_server.c
43 6 3
static int s_create_connection_on_channel()
in source/event_stream_rpc_client.c
53 6 2
static void s_on_protocol_message_written_fn()
in source/event_stream_rpc_client.c
46 6 3
13 5 1