awslabs / aws-greengrass-labs-webrtc
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 115 units with 2,185 lines of code in units (70.7% of code).
    • 1 very long units (103 lines of code)
    • 7 long units (506 lines of code)
    • 28 medium size units (875 lines of code)
    • 27 small units (413 lines of code)
    • 52 very small units (288 lines of code)
4% | 23% | 40% | 18% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c4% | 23% | 40% | 18% | 12%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/src4% | 23% | 40% | 18% | 12%
source0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
103 22 3
static void onRtspSrcPadAdded()
in source/src/AppRtspSrc.c
85 19 3
STATUS initApp()
in source/src/AppCommon.c
79 6 3
78 6 3
STATUS freeApp()
in source/src/AppCommon.c
77 17 1
72 10 2
59 18 3
STATUS createStreamingSession()
in source/src/AppCommon.c
56 3 3
STATUS pollApp()
in source/src/AppCommon.c
49 10 1
static STATUS createAudioAppSink()
in source/src/AppRtspSrc.c
48 6 3
static STATUS createVideoAppSink()
in source/src/AppRtspSrc.c
46 5 3
STATUS createCredential()
in source/src/AppCredential.c
43 12 1
PVOID runMediaSource()
in source/src/AppRtspSrc.c
41 4 1
static STATUS onMediaSinkHook()
in source/src/AppCommon.c
37 9 2
static PVOID discoverMediaSource()
in source/src/AppRtspSrc.c
36 4 1
STATUS destroyCredential()
in source/src/AppCredential.c
36 8 1
INT32 main()
in source/src/AppMain.c
36 8 2
STATUS initMediaSource()
in source/src/AppRtspSrc.c
32 3 1
static STATUS initGstRtspSrc()
in source/src/AppRtspSrc.c
30 4 3
static VOID onConnectionStateChange()
in source/src/AppCommon.c
29 7 2