aws-samples / amazon-kinesis-video-streams-media-interface
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 61 units with 969 lines of code in units (73.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (256 lines of code)
    • 6 simple units (230 lines of code)
    • 51 very simple units (483 lines of code)
0% | 0% | 26% | 23% | 49%
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% | 0% | 26% | 23% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/T310% | 0% | 34% | 24% | 41%
source/V4L20% | 0% | 0% | 21% | 78%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int videoCapturerSetFormat()
in source/T31/T31VideoCapturer.c
77 14 3
int videoCapturerGetFrame()
in source/T31/T31VideoCapturer.c
56 12 5
int audioPlayerSetFormat()
in source/T31/T31AudioPlayer.c
75 11 5
int audioCapturerGetFrame()
in source/T31/T31AudioCapturer.c
48 11 5
int audioCapturerSetFormat()
in source/T31/T31AudioCapturer.c
70 10 5
int videoCapturerSetFormat()
in source/V4L2/V4L2VideoCapturer.c
49 8 3
void videoCapturerDestory()
in source/T31/T31VideoCapturer.c
28 8 1
static int getPacket()
in source/T31/T31VideoCapturer.c
14 7 4
int audioPlayerWriteFrame()
in source/T31/T31AudioPlayer.c
40 7 3
int audioCapturerAcquireStream()
in source/T31/T31AudioCapturer.c
29 6 1
VideoCapturerHandle videoCapturerCreate()
in source/T31/T31VideoCapturer.c
25 5 1
static int startRecvPic()
in source/T31/T31VideoCapturer.c
19 4 2
int audioPlayerAcquireStream()
in source/T31/T31AudioPlayer.c
18 4 1
void audioPlayerDestory()
in source/T31/T31AudioPlayer.c
15 4 1
void audioCapturerDestory()
in source/T31/T31AudioCapturer.c
15 4 1
VideoCapturerHandle videoCapturerCreate()
in source/V4L2/V4L2VideoCapturer.c
20 3 1
void videoCapturerDestory()
in source/V4L2/V4L2VideoCapturer.c
13 3 1
static int stopRecvPic()
in source/T31/T31VideoCapturer.c
15 3 2
int videoCapturerReleaseStream()
in source/T31/T31VideoCapturer.c
13 3 1
static int playFrame()
in source/T31/T31AudioPlayer.c
14 3 2