awslabs / amazon-kinesis-video-streams-producer-c
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 299 units with 7,601 lines of code in units (52.8% of code).
    • 1 very complex units (172 lines of code)
    • 1 complex units (87 lines of code)
    • 26 medium complex units (1,697 lines of code)
    • 49 simple units (2,153 lines of code)
    • 222 very simple units (3,492 lines of code)
2% | 1% | 22% | 28% | 45%
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
h47% | 0% | 27% | 0% | 24%
c0% | 1% | 23% | 31% | 44%
cpp0% | 0% | 15% | 19% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/include/com/amazonaws/kinesis/video/common59% | 0% | 35% | 0% | 4%
src/source0% | 1% | 21% | 29% | 46%
src/source/Common0% | 0% | 23% | 34% | 41%
tst0% | 0% | 14% | 18% | 67%
src/source/Common/Lws0% | 0% | 61% | 32% | 6%
src/source/Common/Curl0% | 0% | 0% | 51% | 48%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
JSMN_API int jsmn_parse()
in src/include/com/amazonaws/kinesis/video/common/jsmn.h
172 74 5
SIZE_T postReadCallback()
in src/source/Response.c
87 29 4
69 24 1
PVOID describeStreamCurlHandler()
in src/source/CurlApiCallbacks.c
120 23 1
static int jsmn_parse_string()
in src/include/com/amazonaws/kinesis/video/common/jsmn.h
57 23 5
INT32 lwsIotCallbackRoutine()
in src/source/Common/Lws/LwsCall.c
127 20 5
STATUS uriEncodeString()
in src/source/Common/AwsV4Signer.c
49 20 4
STATUS addStreamCallbacks()
in src/source/CallbacksProvider.c
55 17 2
STATUS getCanonicalQueryParams()
in src/source/Common/AwsV4Signer.c
98 17 5
STATUS curlApiCallbacksShutdownActiveRequests()
in src/source/CurlApiCallbacks.c
57 16 5
STATUS curlApiCallbacksShutdownActiveUploads()
in src/source/CurlApiCallbacks.c
44 16 6
PVOID getStreamingEndpointCurlHandler()
in src/source/CurlApiCallbacks.c
84 15 1
STATUS setPlatformCallbacks()
in src/source/CallbacksProvider.c
51 15 2
STATUS createCurlApiCallbacks()
in src/source/CurlApiCallbacks.c
110 14 9
STATUS getStreamingEndpointCachingCurl()
in src/source/CurlApiCallbacks.c
55 14 4
STATUS getCanonicalUri()
in src/source/Common/AwsV4Signer.c
41 14 5
STATUS uriDecodeString()
in src/source/Common/AwsV4Signer.c
44 14 4
STATUS tagResourceCurl()
in src/source/CurlApiCallbacks.c
83 13 5
STATUS checkApiCallEmulation()
in src/source/CurlApiCallbacks.c
47 13 3
20 13 1