aws-samples / amazon-kinesis-video-streams-webrtc-sdk-c-for-freertos
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 74 units with 1,764 lines of code in units (77.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (77 lines of code)
    • 15 simple units (715 lines of code)
    • 58 very simple units (972 lines of code)
0% | 0% | 4% | 40% | 55%
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% | 4% | 40% | 55%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
main0% | 0% | 4% | 40% | 55%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
STATUS freeApp()
in main/AppCommon.c
77 17 1
STATUS createCredential()
in main/AppCredential.c
39 10 1
72 10 2
STATUS pollApp()
in main/AppCommon.c
49 10 1
37 9 2
static void event_handler()
in main/kvswebrtc_example_main.c
23 8 4
INT32 WebRTCAppMain()
in main/AppMain.c
36 8 2
void app_main()
in main/kvswebrtc_example_main.c
84 7 1
STATUS destroyCredential()
in main/AppCredential.c
34 7 1
29 7 2
STATUS getPendingMsgQByHashVal()
in main/AppMessageQueue.c
29 7 4
PVOID sendVideoPackets()
in main/AppFileSrc.c
52 6 1
PVOID sendAudioPackets()
in main/AppFileSrc.c
47 6 1
29 6 2
80 6 3
STATUS initApp()
in main/AppCommon.c
75 6 3
STATUS popGeneratedCert()
in main/AppCredential.c
26 5 2
STATUS createPendingMsgQ()
in main/AppMessageQueue.c
23 5 3
STATUS readFrameFromDisk()
in main/AppFileSrc.c
20 4 3
UINT32 getLogLevel()
in main/AppMetrics.c
10 4 1