microsoft / botframework-sdk
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 606 units with 9,516 lines of code in units (47.4% of code).
    • 5 very long units (642 lines of code)
    • 21 long units (1,444 lines of code)
    • 116 medium size units (3,377 lines of code)
    • 143 small units (2,144 lines of code)
    • 321 very small units (1,909 lines of code)
6% | 15% | 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
js6% | 15% | 36% | 23% | 17%
ts12% | 14% | 31% | 21% | 20%
py0% | 39% | 0% | 14% | 45%
cs0% | 6% | 44% | 16% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
parsers/LU/JS/packages8% | 16% | 34% | 23% | 17%
dri0% | 39% | 0% | 14% | 45%
dri/issueNotificationBot/Bot/Bots0% | 25% | 50% | 13% | 10%
parsers/LU/JS/common0% | 10% | 42% | 30% | 16%
dri/issueNotificationBot/Bot/Services0% | 0% | 38% | 13% | 48%
dri/issueNotificationBot/Bot/Dialogs0% | 0% | 60% | 17% | 22%
dri/issueNotificationBot/AzureFunction/src0% | 0% | 33% | 14% | 51%
dri/issueNotificationBot/Bot0% | 0% | 58% | 26% | 14%
dri/issueNotificationBot/Bot/Controllers0% | 0% | 65% | 0% | 34%
schemas/skills/SchemaManifestTests0% | 0% | 0% | 60% | 40%
dri/issueNotificationBot/Bot/Models0% | 0% | 0% | 0% | 100%
tools/changelog0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
parseAndTranslate : async function()
in parsers/LU/JS/packages/lu/src/parser/lufile/translate-helpers.js
198 47 8
const parseAndHandleModelInfoSection = function()
in parsers/LU/JS/packages/lu/src/parser/lufile/parseFileContents.js
138 38 3
const parseAndHandleEntitySection = function()
in parsers/LU/JS/packages/lu/src/parser/lufile/parseFileContents.js
103 31 4
async build()
in parsers/LU/JS/packages/lu/src/parser/qnabuild/builder.ts
102 27 11
async loadContents()
in parsers/LU/JS/packages/lu/src/parser/lubuild/builder.ts
101 18 6
const validateBoundaries = function()
in parsers/LU/JS/packages/lu/src/parser/luis/luisValidator.js
97 26 1
static extractFileContent()
in parsers/LU/JS/packages/lu/src/parser/lufile/luParser.js
94 11 4
async loadContents()
in parsers/LU/JS/packages/lu/src/parser/qnabuild/builder.ts
91 17 7
entities: function()
in parsers/LU/JS/packages/lu/src/parser/converters/luistocsconverter.js
90 4 2
const parseAndHandleEntityV2 = function()
in parsers/LU/JS/packages/lu/src/parser/lufile/parseFileContents.js
88 27 4
async build()
in parsers/LU/JS/packages/lu/src/parser/lubuild/builder.ts
86 25 17
const parseFeatureSections = function()
in parsers/LU/JS/packages/lu/src/parser/lufile/parseFileContents.js
81 30 2
const validateNDepthEntities = function()
in parsers/LU/JS/packages/lu/src/parser/lufile/parseFileContents.js
71 19 3
def main()
in dri/report.py
67 43 0
const handlePhraseList = function()
in parsers/LU/JS/packages/lu/src/parser/lufile/parseFileContents.js
67 23 6
const handleClosedList = function()
in parsers/LU/JS/packages/lu/src/parser/lufile/parseFileContents.js
65 19 5
static tokenizeUtterance()
in parsers/LU/JS/packages/lu/src/parser/lufile/visitor.js
62 15 1
protected override async Task OnMessageActivityAsync()
in dri/issueNotificationBot/Bot/Bots/SignInBot.cs
57 13 2
const resolveQuestionRef = function()
in parsers/LU/JS/packages/lu/src/parser/lu/luMerger.js
56 37 3
const resolveUttAndPattRef = function()
in parsers/LU/JS/packages/lu/src/parser/lu/luMerger.js
55 26 3