microsoft / ntttcp-for-linux
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 66 units with 2,449 lines of code in units (66.3% of code).
    • 7 very long units (914 lines of code)
    • 8 long units (629 lines of code)
    • 16 medium size units (545 lines of code)
    • 15 small units (235 lines of code)
    • 20 very small units (126 lines of code)
37% | 25% | 22% | 9% | 5%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c37% | 25% | 22% | 9% | 5%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src37% | 25% | 22% | 9% | 5%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
172 15 1
int parse_arguments()
in src/parameter.c
146 59 3
135 25 1
int ntttcp_server_epoll()
in src/tcpstream.c
131 29 1
int verify_args()
in src/parameter.c
115 48 1
114 21 1
int ntttcp_server_select()
in src/tcpstream.c
101 24 1
100 15 1
void run_ntttcp_throughput_management()
in src/throughputmanagement.c
99 17 1
int ntttcp_server_listen()
in src/tcpstream.c
85 13 1
void print_flags()
in src/parameter.c
77 36 1
int create_sender_sync_socket()
in src/endpointsync.c
74 10 1
67 14 1
void print_usage()
in src/parameter.c
66 1 0
int main()
in src/main.c
61 12 2
50 8 1
44 10 3
int process_mappings()
in src/parameter.c
42 9 1
39 1 1
37 5 3