awslabs / aws-c-event-stream
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 120 units with 2,842 lines of code in units (72.6% of code).
    • 5 very long units (723 lines of code)
    • 13 long units (782 lines of code)
    • 20 medium size units (623 lines of code)
    • 29 small units (420 lines of code)
    • 53 very small units (294 lines of code)
25% | 27% | 21% | 14% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c25% | 27% | 21% | 14% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source25% | 27% | 21% | 14% | 10%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static void s_route_message_by_type()
in source/event_stream_rpc_server.c
205 19 7
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_client.c
146 15 7
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
84 13 2
67 19 5
66 14 3
int aws_event_stream_rpc_client_connection_connect()
in source/event_stream_rpc_client.c
64 4 2
static void s_write_handler_message()
in source/event_stream_channel_handler.c
61 6 3
static int s_read_header_type()
in source/event_stream.c
59 13 4
static void s_on_message_received()
in source/event_stream_rpc_server.c
59 5 3
59 5 5
static int s_headers_state()
in source/event_stream.c
54 10 4
static int s_create_connection_on_channel()
in source/event_stream_rpc_client.c
53 6 2
static void s_on_message_received()
in source/event_stream_rpc_client.c
53 5 3
static int s_verify_prelude_state()
in source/event_stream.c
52 5 4
51 14 2
static void s_on_accept_channel_setup()
in source/event_stream_rpc_server.c
50 7 4
static void s_on_protocol_message_written_fn()
in source/event_stream_rpc_client.c
46 6 3