microsoft / ftl-sdk
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 188 units with 4,267 lines of code in units (69.1% of code).
    • 6 very long units (983 lines of code)
    • 13 long units (1,014 lines of code)
    • 33 medium size units (1,153 lines of code)
    • 42 small units (632 lines of code)
    • 94 very small units (485 lines of code)
23% | 23% | 27% | 14% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c23% | 23% | 27% | 14% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
libftl19% | 30% | 29% | 15% | 4%
ftl_app39% | 15% | 24% | 12% | 8%
ftl_app/win320% | 71% | 0% | 0% | 28%
libftl/hmac0% | 0% | 100% | 0% | 0%
libftl/posix0% | 0% | 21% | 20% | 58%
libftl/win320% | 0% | 18% | 14% | 67%
libftl/gettimeofday0% | 0% | 0% | 42% | 57%
ftl_app/posix0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
261 25 1
234 76 3
int nalu_parse_sps()
in ftl_app/nalu.c
153 21 2
123 15 4
111 22 1
int nalu_read()
in ftl_app/nalu.c
101 17 2
int nalu_parse_pps()
in ftl_app/nalu.c
97 17 2
int media_send_video()
in libftl/media.c
94 17 5
ftl_status_t _ingest_connect()
in libftl/handshake.c
91 24 1
87 17 1
87 22 3
86 13 1
ftl_status_t media_init()
in libftl/media.c
85 14 1
73 13 1
70 11 1
ftl_status_t _log_response()
in libftl/handshake.c
64 21 2
64 13 1
63 7 1
int getopt()
in ftl_app/win32/xgetopt.c
53 16 3
50 6 2