awslabs / aws-streamer
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 209 units with 2,344 lines of code in units (64.0% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (163 lines of code)
    • 23 medium size units (752 lines of code)
    • 53 small units (770 lines of code)
    • 130 very small units (659 lines of code)
0% | 6% | 32% | 32% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 6% | 28% | 35% | 28%
hpp0% | 34% | 17% | 30% | 18%
cpp0% | 0% | 50% | 27% | 22%
c0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
awstreamer/gst_pipeline0% | 11% | 34% | 35% | 18%
awstreamer/gst_plugins/mxnet0% | 13% | 42% | 23% | 20%
awstreamer/gst_plugins/cvmlfilter0% | 0% | 43% | 33% | 22%
awstreamer/utils0% | 0% | 18% | 41% | 40%
awstreamer/gst_plugins/python0% | 0% | 25% | 34% | 39%
ROOT0% | 0% | 63% | 0% | 36%
awstreamer/gst_configurer0% | 0% | 14% | 36% | 49%
awstreamer/gst_metadata0% | 0% | 0% | 34% | 65%
awstreamer/gst_viewer0% | 0% | 0% | 0% | 100%
awstreamer0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in awstreamer/gst_pipeline/cv_pipeline.py
57 19 2
def start()
in awstreamer/gst_pipeline/cv_pipeline.py
54 21 1
inline cv::Mat PlotBbox()
in awstreamer/gst_plugins/mxnet/src/common.hpp
52 10 8
def pad_buffer_probe()
in awstreamer/gst_pipeline/ds_pipeline.py
48 10 4
static void gst_mxnet_class_init()
in awstreamer/gst_plugins/mxnet/src/gstmxnet.cpp
47 1 1
void gst_mxnet_set_property()
in awstreamer/gst_plugins/mxnet/src/gstmxnet.cpp
46 10 4
def on_pad_added()
in awstreamer/gst_pipeline/stream_pipeline.py
42 13 4
def get_gst_launch_str()
in awstreamer/gst_pipeline/stream_graph.py
41 18 2
def configure()
in awstreamer/gst_pipeline/stream_graph.py
39 16 3
def do_transform_ip()
in awstreamer/gst_plugins/python/neodlr.py
38 8 2
def set_env_variables()
in awstreamer/gst_pipeline/stream_client.py
37 9 1
def schedule()
in awstreamer/gst_pipeline/stream_client.py
36 16 4
static void gst_cvmlfilter_class_init()
in awstreamer/gst_plugins/cvmlfilter/gstcvmlfilter.cpp
34 1 1
def compile()
in awstreamer/gst_pipeline/stream_graph.py
32 9 2
void gst_cvmlfilter_set_property()
in awstreamer/gst_plugins/cvmlfilter/gstcvmlfilter.cpp
31 7 4
int ImageProcessor::runNeuralNetworkInference()
in awstreamer/gst_plugins/cvmlfilter/ImageProcessor.cpp
31 4 2
def merge_video_files()
in awstreamer/utils/video.py
29 5 2
28 4 2
def configure()
in awstreamer/gst_pipeline/dvr_pipeline.py
28 6 2
inline void LoadCheckpoint()
in awstreamer/gst_plugins/mxnet/src/common.hpp
26 4 6