awslabs / aws-greengrass-labs-webrtc
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 115 units with 2,185 lines of code in units (70.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (367 lines of code)
    • 13 simple units (568 lines of code)
    • 97 very simple units (1,250 lines of code)
0% | 0% | 16% | 25% | 57%
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% | 16% | 26% | 57%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/src0% | 0% | 16% | 26% | 57%
source0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
103 22 3
static void onRtspSrcPadAdded()
in source/src/AppRtspSrc.c
85 19 3
59 18 3
STATUS freeApp()
in source/src/AppCommon.c
77 17 1
STATUS createCredential()
in source/src/AppCredential.c
43 12 1
72 10 2
STATUS pollApp()
in source/src/AppCommon.c
49 10 1
static STATUS onMediaSinkHook()
in source/src/AppCommon.c
37 9 2
STATUS destroyCredential()
in source/src/AppCredential.c
36 8 1
INT32 main()
in source/src/AppMain.c
36 8 2
static VOID onConnectionStateChange()
in source/src/AppCommon.c
29 7 2
STATUS getPendingMsgQByHashVal()
in source/src/AppMessageQueue.c
29 7 4
static void onMsgErrorFromBus()
in source/src/AppRtspSrc.c
27 6 3
static STATUS createAudioAppSink()
in source/src/AppRtspSrc.c
48 6 3
static STATUS latchRtspConfig()
in source/src/AppRtspSrc.c
21 6 1
static VOID onIceCandidateHandler()
in source/src/AppCommon.c
27 6 2
78 6 3
STATUS initApp()
in source/src/AppCommon.c
79 6 3
static void onMsgEosFromBus()
in source/src/AppRtspSrc.c
17 5 3
static STATUS createVideoAppSink()
in source/src/AppRtspSrc.c
46 5 3