microsoft / vision-ai-developer-kit
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 258 units with 2,852 lines of code in units (28.7% of code).
    • 2 very long units (213 lines of code)
    • 6 long units (359 lines of code)
    • 26 medium size units (786 lines of code)
    • 45 small units (651 lines of code)
    • 179 very small units (843 lines of code)
7% | 12% | 27% | 22% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js15% | 18% | 9% | 15% | 40%
py0% | 7% | 43% | 29% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
camera-sdk/sdk_api_docs/_static15% | 18% | 9% | 15% | 40%
machine-learning-notebooks/02-mobilenet-transfer-learning-scripts0% | 24% | 58% | 6% | 9%
camera-sdk/iotccsdk0% | 0% | 48% | 37% | 13%
machine-learning-notebooks0% | 0% | 31% | 38% | 29%
camera-sdk0% | 0% | 0% | 49% | 50%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
this.stemWord = function()
in camera-sdk/sdk_api_docs/_static/language_data.js
111 29 1
(function()()
in camera-sdk/sdk_api_docs/_static/underscore-1.3.1.js
102 20 1
performTermsSearch : function()
in camera-sdk/sdk_api_docs/_static/searchtools.js
76 27 4
query : function()
in camera-sdk/sdk_api_docs/_static/searchtools.js
63 16 1
function eq()
in camera-sdk/sdk_api_docs/_static/underscore-1.3.1.js
58 41 3
def get_or_create_bottleneck()
in machine-learning-notebooks/02-mobilenet-transfer-learning-scripts/retrain.py
55 5 12
def create_image_lists()
in machine-learning-notebooks/02-mobilenet-transfer-learning-scripts/retrain.py
54 18 3
performObjectSearch : function()
in camera-sdk/sdk_api_docs/_static/searchtools.js
53 15 2
def start()
in camera-sdk/iotccsdk/frame_iterators.py
49 11 2
def configure_preview()
in camera-sdk/iotccsdk/camera.py
48 20 6
var Stemmer = function()
in camera-sdk/sdk_api_docs/_static/language_data.js
42 1 0
function highlight()
in camera-sdk/sdk_api_docs/_static/doctools.js
40 8 2
def get_random_cached_bottlenecks()
in machine-learning-notebooks/02-mobilenet-transfer-learning-scripts/retrain.py
40 5 11
def add_input_distortions()
in machine-learning-notebooks/02-mobilenet-transfer-learning-scripts/retrain.py
37 2 9
def add_final_training_ops()
in machine-learning-notebooks/02-mobilenet-transfer-learning-scripts/retrain.py
36 1 4
def main()
in machine-learning-notebooks/main.py
33 4 1
def connect()
in camera-sdk/iotccsdk/ipcprovider.py
31 8 1
def get_inferences()
in camera-sdk/iotccsdk/camera.py
30 10 1
def configure_preview()
in machine-learning-notebooks/camera.py
30 15 6
def _get_supported_params()
in camera-sdk/iotccsdk/camera.py
29 2 1