awslabs / amazon-kinesis-video-streams-producer-c
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 299 units with 7,601 lines of code in units (52.8% of code).
    • 4 very long units (529 lines of code)
    • 34 long units (2,298 lines of code)
    • 81 medium size units (2,661 lines of code)
    • 111 small units (1,644 lines of code)
    • 69 very small units (469 lines of code)
6% | 30% | 35% | 21% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c5% | 28% | 37% | 22% | 5%
h47% | 15% | 18% | 7% | 11%
cpp0% | 43% | 23% | 22% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/source5% | 26% | 39% | 23% | 5%
src/include/com/amazonaws/kinesis/video/common59% | 19% | 15% | 0% | 4%
src/source/Common/Lws61% | 32% | 0% | 0% | 6%
src/source/Common0% | 34% | 39% | 22% | 3%
tst0% | 40% | 23% | 22% | 12%
src/source/Common/Curl0% | 51% | 23% | 15% | 9%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
JSMN_API int jsmn_parse()
in src/include/com/amazonaws/kinesis/video/common/jsmn.h
172 74 5
INT32 lwsIotCallbackRoutine()
in src/source/Common/Lws/LwsCall.c
127 20 5
PVOID describeStreamCurlHandler()
in src/source/CurlApiCallbacks.c
120 23 1
STATUS createCurlApiCallbacks()
in src/source/CurlApiCallbacks.c
110 14 9
STATUS getCanonicalQueryParams()
in src/source/Common/AwsV4Signer.c
98 17 5
91 2 1
88 13 2
SIZE_T postReadCallback()
in src/source/Response.c
87 29 4
86 10 1
PVOID getStreamingEndpointCurlHandler()
in src/source/CurlApiCallbacks.c
84 15 1
STATUS tagResourceCurl()
in src/source/CurlApiCallbacks.c
83 13 5
STATUS shutdownStreamCurl()
in src/source/CurlApiCallbacks.c
79 10 3
STATUS putStreamCurl()
in src/source/CurlApiCallbacks.c
78 12 8
STATUS initializeCurlSession()
in src/source/Response.c
74 11 8
STATUS createStreamCurl()
in src/source/CurlApiCallbacks.c
71 10 7
STATUS generateCanonicalRequestString()
in src/source/Common/AwsV4Signer.c
70 6 3
STATUS blockingCurlCall()
in src/source/Common/Curl/CurlCall.c
69 9 2
69 24 1
PVOID createStreamCurlHandler()
in src/source/CurlApiCallbacks.c
67 10 1
STATUS blockingLwsCall()
in src/source/Common/Lws/LwsCall.c
66 6 2