aws-samples / ds-peoplecounter-l4v-workshop
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 33 units with 354 lines of code in units (16.2% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (76 lines of code)
    • 4 medium size units (127 lines of code)
    • 5 small units (75 lines of code)
    • 23 very small units (76 lines of code)
0% | 21% | 35% | 21% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cc0% | 40% | 37% | 0% | 22%
py0% | 0% | 34% | 45% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lab1/deepstream_plugin0% | 40% | 37% | 0% | 22%
lab2/inference_client0% | 0% | 34% | 45% | 20%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
int NeoDLRLayer::LoadDLRInfo()
in lab1/deepstream_plugin/neodlr_plugin.cc
76 8 0
int NeoDLRLayer::enqueue()
in lab1/deepstream_plugin/neodlr_plugin.cc
35 6 5
bool NvDsInferParseCustomGluonYoloV3()
in lab1/deepstream_plugin/nvdsinfer_custombboxparser.cc
35 3 4
def add_EdgeAgentServicer_to_server()
in lab2/inference_client/edge_agent_pb2_grpc.py
31 1 2
def __init__()
in lab2/inference_client/edge_agent_pb2_grpc.py
26 1 2
def DetectAnomalies()
in lab2/inference_client/edge_agent_pb2_grpc.py
15 1 3
def StartModel()
in lab2/inference_client/edge_agent_pb2_grpc.py
15 1 3
def StopModel()
in lab2/inference_client/edge_agent_pb2_grpc.py
15 1 3
def ListModels()
in lab2/inference_client/edge_agent_pb2_grpc.py
15 1 3
def DescribeModel()
in lab2/inference_client/edge_agent_pb2_grpc.py
15 1 3
Dims ToTrtDims()
in lab1/deepstream_plugin/neodlr_plugin.cc
7 2 1
def gstreamer_pipeline()
in lab2/inference_client/sample-client-camera-mqtt.py
7 1 0
def gstreamer_pipeline()
in lab2/inference_client/sample-client-camera.py
7 1 0
void NeoDLRLayer::configurePlugin()
in lab1/deepstream_plugin/neodlr_plugin.cc
5 1 10
DataType ToTrtDataType()
in lab1/deepstream_plugin/neodlr_plugin.cc
4 2 1
void NeoDLRLayer::serialize()
in lab1/deepstream_plugin/neodlr_plugin.cc
4 1 1
nvinfer1::DataType NeoDLRLayer::getOutputDataType()
in lab1/deepstream_plugin/neodlr_plugin.cc
4 1 3
bool NeoDLRLayer::isOutputBroadcastAcrossBatch()
in lab1/deepstream_plugin/neodlr_plugin.cc
4 1 3
def DetectAnomalies()
in lab2/inference_client/edge_agent_pb2_grpc.py
4 1 3
def StartModel()
in lab2/inference_client/edge_agent_pb2_grpc.py
4 1 3