aws-samples / amazon-kinesis-video-streams-producer-embedded-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 207 units with 6,542 lines of code in units (72.1% of code).
    • 0 very complex units (0 lines of code)
    • 9 complex units (1,218 lines of code)
    • 32 medium complex units (2,070 lines of code)
    • 43 simple units (1,424 lines of code)
    • 123 very simple units (1,830 lines of code)
0% | 18% | 31% | 21% | 27%
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
c0% | 18% | 31% | 21% | 27%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
libraries/amazon/amazon-kinesis-video-streams-webrtc-sdk-c0% | 30% | 30% | 18% | 20%
src/source/restful0% | 29% | 33% | 21% | 15%
src/source/app0% | 17% | 34% | 19% | 28%
src/source/codec0% | 25% | 47% | 13% | 13%
src/source/net0% | 0% | 45% | 4% | 50%
src/source/mkv0% | 0% | 31% | 55% | 12%
src/source/stream0% | 0% | 33% | 35% | 31%
app/frame-ring-buffer/source0% | 0% | 0% | 28% | 71%
src/port0% | 0% | 0% | 0% | 100%
src/source/os0% | 0% | 0% | 0% | 100%
src/source/misc0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int KvsApp_setoption()
in src/source/app/kvsapp.c
200 40 3
int Kvs_putMediaStart()
in src/source/restful/kvs/restapi_kvs.c
116 36 4
STATUS depayH264FromRtpPayload()
in libraries/amazon/amazon-kinesis-video-streams-webrtc-sdk-c/patch/src/source/Rtp/Codecs/RtpH264Payloader.c
135 34 5
void getH264VideoResolution()
in src/source/codec/sps_decode.c
120 30 4
STATUS writeFrame()
in libraries/amazon/amazon-kinesis-video-streams-webrtc-sdk-c/patch/src/source/PeerConnection/Rtp.c
172 28 2
STATUS writeFrameEx()
in libraries/amazon/amazon-kinesis-video-streams-webrtc-sdk-c/patch/src/source/PeerConnection/Rtp.c
197 28 3
int Kvs_getDataEndpoint()
in src/source/restful/kvs/restapi_kvs.c
98 27 4
int Kvs_describeStream()
in src/source/restful/kvs/restapi_kvs.c
90 26 3
int Kvs_createStream()
in src/source/restful/kvs/restapi_kvs.c
90 26 3
static AwsSigV4Handle prvSign()
in src/source/restful/kvs/restapi_kvs.c
82 25 5
int NALU_convertAnnexBToAvccInPlace()
in src/source/codec/nalu.c
121 21 4
int AwsSigV4_Sign()
in src/source/restful/aws_signer_v4.c
81 21 6
void KvsApp_terminate()
in src/source/app/kvsapp.c
100 21 1
int KvsApp_addFrameWithCallbacks()
in src/source/app/kvsapp.c
84 21 7
int NALU_getNaluFromAnnexBNalus()
in src/source/codec/nalu.c
82 19 5
DataFrameHandle Kvs_streamAddDataFrame()
in src/source/stream/stream.c
118 19 2
STATUS createPayloadFromNalu()
in libraries/amazon/amazon-kinesis-video-streams-webrtc-sdk-c/patch/src/source/Rtp/Codecs/RtpH264Payloader.c
81 18 6
static int prvParseFragmentAckLength()
in src/source/restful/kvs/restapi_kvs.c
55 15 4
static int prvPutMediaSendData()
in src/source/app/kvsapp.c
62 15 3
int Http_recvHttpRsp()
in src/source/net/http_helper.c
74 15 4