microsoft / botbuilder-js
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 3,362 units with 49,181 lines of code in units (64.5% of code).
    • 49 very long units (8,026 lines of code)
    • 88 long units (6,049 lines of code)
    • 443 medium size units (13,334 lines of code)
    • 805 small units (11,942 lines of code)
    • 1,977 very small units (9,830 lines of code)
16% | 12% | 27% | 24% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js37% | 16% | 15% | 22% | 8%
ts9% | 11% | 30% | 24% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tools/resourceManagement46% | 18% | 14% | 20% | 1%
libraries/adaptive-expressions34% | 7% | 17% | 20% | 20%
libraries/botbuilder-dialogs-adaptive7% | 9% | 29% | 24% | 29%
tools/framework16% | 8% | 22% | 25% | 27%
libraries/botbuilder0% | 16% | 38% | 24% | 20%
libraries/botbuilder-dialogs0% | 17% | 35% | 24% | 22%
libraries/botbuilder-ai0% | 28% | 35% | 20% | 15%
libraries/botbuilder-lg0% | 14% | 34% | 30% | 20%
libraries/botframework-connector0% | 17% | 39% | 25% | 17%
libraries/botbuilder-dialogs-adaptive-runtime0% | 56% | 34% | 2% | 7%
libraries/botbuilder-core0% | 3% | 35% | 30% | 30%
libraries/botbuilder-ai-orchestrator0% | 39% | 54% | 0% | 5%
testing/skills0% | 26% | 32% | 16% | 24%
libraries/botbuilder-dialogs-adaptive-runtime-integration-azure-functions0% | 43% | 39% | 0% | 17%
libraries/botbuilder-azure0% | 0% | 65% | 23% | 11%
libraries/botbuilder-dialogs-adaptive-testing0% | 0% | 36% | 40% | 23%
libraries/botframework-streaming0% | 0% | 34% | 31% | 33%
generators/generator-botbuilder0% | 0% | 17% | 42% | 39%
libraries/botbuilder-testing0% | 0% | 79% | 9% | 11%
libraries/botframework-config0% | 0% | 21% | 36% | 42%
testing/browser-functional0% | 0% | 36% | 37% | 25%
testing/testbot0% | 0% | 17% | 43% | 38%
libraries/botframework-schema0% | 0% | 15% | 31% | 53%
libraries/botbuilder-azure-blobs0% | 0% | 20% | 24% | 55%
libraries/botbuilder-dialogs-declarative0% | 0% | 10% | 38% | 50%
libraries/adaptive-expressions-ie110% | 0% | 100% | 0% | 0%
tools/util0% | 0% | 12% | 43% | 44%
libraries/botbuilder-stdlib0% | 0% | 60% | 0% | 39%
testing/functional0% | 0% | 100% | 0% | 0%
tools/scripts0% | 0% | 0% | 37% | 62%
libraries/botbuilder-applicationinsights0% | 0% | 0% | 63% | 36%
build/scripts0% | 0% | 0% | 100% | 0%
libraries/botbuilder-repo-utils0% | 0% | 0% | 30% | 70%
libraries/botbuilder-azure-queues0% | 0% | 0% | 46% | 53%
libraries/swagger0% | 0% | 0% | 100% | 0%
libraries/botbuilder-dialogs-adaptive-runtime-integration-restify0% | 0% | 0% | 0% | 100%
libraries/botbuilder-dialogs-adaptive-runtime-core0% | 0% | 0% | 0% | 100%
libraries/botbuilder-dialogs-adaptive-runtime-integration-express0% | 0% | 0% | 0% | 100%
testing/streaming-e2e0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Central Standard Time()
in libraries/adaptive-expressions/src/timeZoneConverter.ts
419 2 1
Central Standard Time()
in libraries/adaptive-expressions/src/timeZoneConverter.ts
418 2 1
Eastern Standard Time()
in libraries/adaptive-expressions/src/timeZoneConverter.ts
380 2 1
Eastern Standard Time()
in libraries/adaptive-expressions/src/timeZoneConverter.ts
379 2 1
export function convertCSharpDateTimeToDayjs()
in libraries/adaptive-expressions/src/datetimeFormatConverter.ts
341 105 1
Mountain Standard Time()
in libraries/adaptive-expressions/src/timeZoneConverter.ts
277 2 1
Mountain Standard Time()
in libraries/adaptive-expressions/src/timeZoneConverter.ts
276 2 1
Pacific Standard Time()
in libraries/adaptive-expressions/src/timeZoneConverter.ts
244 2 1
Pacific Standard Time()
in libraries/adaptive-expressions/src/timeZoneConverter.ts
243 2 1
private static getStandardFunctions()
in libraries/adaptive-expressions/src/expressionFunctions.ts
186 1 0
function _validate()
in tools/resourceManagement/lib/resource/operations/deployments.js
168 64 5
function _beginCreateOrUpdate()
in tools/resourceManagement/lib/resource/operations/deployments.js
168 64 5
function _beginCreateOrUpdate()
in tools/resourceManagement/lib/resource/operations/resources.js
166 69 9
function _createOrUpdate()
in tools/resourceManagement/lib/resource/operations/resourceGroups.js
150 56 4
function _list()
in tools/resourceManagement/lib/resource/operations/deploymentOperations.js
143 61 4
function _get()
in tools/resourceManagement/lib/resource/operations/deploymentOperations.js
140 57 5
function _listByResourceGroup()
in tools/resourceManagement/lib/resource/operations/resources.js
139 67 3
function _get()
in tools/resourceManagement/lib/resource/operations/deployments.js
136 54 4
function _exportTemplate()
in tools/resourceManagement/lib/resource/operations/deployments.js
136 54 4
function _update()
in tools/resourceManagement/lib/resource/operations/resourceGroups.js
134 51 4