microsoft / ntttcp-for-linux
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 66 units with 2,449 lines of code in units (66.3% of code).
    • 1 very complex units (146 lines of code)
    • 3 complex units (323 lines of code)
    • 10 medium complex units (968 lines of code)
    • 14 simple units (478 lines of code)
    • 38 very simple units (534 lines of code)
5% | 13% | 39% | 19% | 21%
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
c5% | 13% | 39% | 19% | 21%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src5% | 13% | 39% | 19% | 21%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int parse_arguments()
in src/parameter.c
146 59 3
int verify_args()
in src/parameter.c
115 48 1
void print_flags()
in src/parameter.c
77 36 1
int ntttcp_server_epoll()
in src/tcpstream.c
131 29 1
135 25 1
int ntttcp_server_select()
in src/tcpstream.c
101 24 1
114 21 1
void run_ntttcp_throughput_management()
in src/throughputmanagement.c
99 17 1
100 15 1
172 15 1
67 14 1
int ntttcp_server_listen()
in src/tcpstream.c
85 13 1
int main()
in src/main.c
61 12 2
34 12 2
int create_sender_sync_socket()
in src/endpointsync.c
74 10 1
44 10 3
int process_mappings()
in src/parameter.c
42 9 1
33 8 1
50 8 1
37 8 2