microsoft / vscode-azure-iot-edge
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 801 units with 12,004 lines of code in units (83.3% of code).
    • 3 very long units (1,194 lines of code)
    • 20 long units (1,287 lines of code)
    • 140 medium size units (4,306 lines of code)
    • 189 small units (2,755 lines of code)
    • 449 very small units (2,462 lines of code)
9% | 10% | 35% | 22% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js10% | 11% | 35% | 22% | 20%
ts8% | 8% | 37% | 24% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
assets/views10% | 11% | 35% | 22% | 20%
src82% | 0% | 0% | 6% | 10%
src/edge10% | 20% | 38% | 18% | 12%
src/common0% | 5% | 24% | 31% | 38%
src/container0% | 0% | 53% | 32% | 13%
src/intelliSense0% | 0% | 55% | 30% | 13%
src/gallery0% | 0% | 76% | 11% | 12%
src/marketplace0% | 0% | 51% | 14% | 34%
assets/marketplace0% | 0% | 52% | 17% | 30%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
(function (global, factory)()
in assets/views/vue.js
900 95 2
export function activate()
in src/extension.ts
160 10 1
private async addModuleProj()
in src/edge/edgeManager.ts
134 32 6
function hydrate()
in assets/views/vue.js
83 34 4
private async selectModuleTemplate()
in src/edge/edgeManager.ts
80 7 2
function enter()
in assets/views/vue.js
77 33 2
function _createElement()
in assets/views/vue.js
74 25 5
render: function render()
in assets/views/vue.js
71 29 1
function processAttrs()
in assets/views/vue.js
70 22 1
function parseFilters()
in assets/views/vue.js
66 38 1
66 13 1
function updateChildren()
in assets/views/vue.js
64 19 5
63 11 6
function createComponent()
in assets/views/vue.js
62 13 5
function addHandler()
in assets/views/vue.js
61 20 6
60 20 1
public async addModuleInfo()
in src/edge/edgeManager.ts
59 12 5
function genData$2()
in assets/views/vue.js
58 20 2
Vue.prototype.$mount = function()
in assets/views/vue.js
58 20 2
function createElm()
in assets/views/vue.js
55 14 7