aws-samples / amazon-kinesis-video-streams-webrtc-sdk-c-for-freertos
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 74 units with 1,764 lines of code in units (77.8% of code).
    • 0 very long units (0 lines of code)
    • 6 long units (440 lines of code)
    • 26 medium size units (805 lines of code)
    • 25 small units (378 lines of code)
    • 17 very small units (141 lines of code)
0% | 24% | 45% | 21% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 24% | 45% | 21% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
main0% | 24% | 45% | 21% | 7%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
void app_main()
in main/kvswebrtc_example_main.c
84 7 1
80 6 3
STATUS freeApp()
in main/AppCommon.c
77 17 1
STATUS initApp()
in main/AppCommon.c
75 6 3
72 10 2
PVOID sendVideoPackets()
in main/AppFileSrc.c
52 6 1
STATUS pollApp()
in main/AppCommon.c
49 10 1
48 3 3
PVOID sendAudioPackets()
in main/AppFileSrc.c
47 6 1
void wifi_init_sta()
in main/kvswebrtc_example_main.c
43 3 1
STATUS createCredential()
in main/AppCredential.c
39 10 1
37 9 2
INT32 WebRTCAppMain()
in main/AppMain.c
36 8 2
STATUS destroyCredential()
in main/AppCredential.c
34 7 1
STATUS initMediaSource()
in main/AppFileSrc.c
29 3 1
29 7 2
29 6 2
STATUS getPendingMsgQByHashVal()
in main/AppMessageQueue.c
29 7 4
28 1 1
static STATUS handleOffer()
in main/AppCommon.c
28 3 3