aws-samples / amazon-kinesis-video-streams-producer-embedded-c
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 207 units with 6,542 lines of code in units (72.1% of code).
    • 9 very long units (1,280 lines of code)
    • 26 long units (1,871 lines of code)
    • 76 medium size units (2,344 lines of code)
    • 55 small units (794 lines of code)
    • 41 very small units (253 lines of code)
19% | 28% | 35% | 12% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c19% | 28% | 35% | 12% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
libraries/amazon/amazon-kinesis-video-streams-webrtc-sdk-c36% | 24% | 29% | 7% | 2%
src/source/codec51% | 17% | 11% | 16% | 3%
src/source/app17% | 26% | 40% | 13% | 1%
src/source/stream33% | 0% | 54% | 5% | 7%
src/source/restful8% | 41% | 34% | 14% | <1%
src/source/mkv0% | 62% | 32% | 4% | 0%
src/source/net0% | 38% | 50% | 6% | 4%
app/frame-ring-buffer/source0% | 0% | 57% | 31% | 10%
src/source/os0% | 0% | 53% | 16% | 30%
src/port0% | 0% | 18% | 25% | 55%
src/source/misc0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
int KvsApp_setoption()
in src/source/app/kvsapp.c
200 40 3
STATUS writeFrameEx()
in libraries/amazon/amazon-kinesis-video-streams-webrtc-sdk-c/patch/src/source/PeerConnection/Rtp.c
197 28 3
STATUS writeFrame()
in libraries/amazon/amazon-kinesis-video-streams-webrtc-sdk-c/patch/src/source/PeerConnection/Rtp.c
172 28 2
STATUS depayH264FromRtpPayload()
in libraries/amazon/amazon-kinesis-video-streams-webrtc-sdk-c/patch/src/source/Rtp/Codecs/RtpH264Payloader.c
135 34 5
int NALU_convertAnnexBToAvccInPlace()
in src/source/codec/nalu.c
121 21 4
void getH264VideoResolution()
in src/source/codec/sps_decode.c
120 30 4
DataFrameHandle Kvs_streamAddDataFrame()
in src/source/stream/stream.c
118 19 2
int Kvs_putMediaStart()
in src/source/restful/kvs/restapi_kvs.c
116 36 4
STATUS resendPacketOnNack()
in libraries/amazon/amazon-kinesis-video-streams-webrtc-sdk-c/patch/src/source/PeerConnection/Retransmitter.c
101 12 2
void KvsApp_terminate()
in src/source/app/kvsapp.c
100 21 1
int Kvs_getDataEndpoint()
in src/source/restful/kvs/restapi_kvs.c
98 27 4
int Kvs_describeStream()
in src/source/restful/kvs/restapi_kvs.c
90 26 3
int Kvs_createStream()
in src/source/restful/kvs/restapi_kvs.c
90 26 3
static int prvCreateAudioTrackEntry()
in src/source/mkv/mkv_generator.c
87 13 3
int Mkv_initializeHeaders()
in src/source/mkv/mkv_generator.c
85 14 3
int KvsApp_addFrameWithCallbacks()
in src/source/app/kvsapp.c
84 21 7
int NALU_getNaluFromAnnexBNalus()
in src/source/codec/nalu.c
82 19 5
static AwsSigV4Handle prvSign()
in src/source/restful/kvs/restapi_kvs.c
82 25 5
int AwsSigV4_Sign()
in src/source/restful/aws_signer_v4.c
81 21 6
STATUS createPayloadForH264()
in libraries/amazon/amazon-kinesis-video-streams-webrtc-sdk-c/patch/src/source/Rtp/Codecs/RtpH264Payloader.c
81 12 7