microsoft / BotBuilder-Location
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 237 units with 2,953 lines of code in units (53.6% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (123 lines of code)
    • 41 medium size units (1,139 lines of code)
    • 62 small units (937 lines of code)
    • 132 very small units (754 lines of code)
0% | 4% | 38% | 31% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 5% | 35% | 34% | 24%
ts0% | 7% | 50% | 24% | 18%
js0% | 0% | 32% | 34% | 33%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
CSharp/BotBuilderLocation/Dialogs0% | 10% | 37% | 33% | 18%
Node/core/src0% | 7% | 50% | 24% | 18%
Node/core/lib0% | 0% | 33% | 33% | 33%
CSharp/BotBuilderLocation0% | 0% | 31% | 38% | 30%
CSharp/BotBuilderLocation/Azure0% | 0% | 42% | 27% | 29%
CSharp/BotBuilderLocation/Bing0% | 0% | 58% | 0% | 41%
CSharp/BotBuilderLocation.Sample/Controllers0% | 0% | 0% | 62% | 37%
CSharp/BotBuilderLocation.Sample/App_Start0% | 0% | 0% | 100% | 0%
Node/sample0% | 0% | 0% | 59% | 40%
CSharp/BotBuilderLocation.Sample0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public IDialog CreateDialog()
in CSharp/BotBuilderLocation/Dialogs/LocationDialogFactory.cs
65 9 4
function getLocationPickerPrompt()
in Node/core/src/botbuilder-location.ts
58 17 0
function createDialog()
in Node/core/lib/dialogs/retrieve-favorite-location-dialog.js
47 7 1
function createDialog()
in Node/core/src/dialogs/retrieve-favorite-location-dialog.ts
47 7 1
function createDialog()
in Node/core/lib/dialogs/require-fields-dialog.js
42 8 0
function createDialog()
in Node/core/src/dialogs/require-fields-dialog.ts
40 8 0
public string GetLocationMapImageUrl()
in CSharp/BotBuilderLocation/Bing/BingGeoSpatialService.cs
36 5 2
function createDialog()
in Node/core/src/dialogs/retrieve-facebook-location-dialog.ts
35 6 1
private async Task TryHandleSpecialCommandResponse()
in CSharp/BotBuilderLocation/Dialogs/LocationDialogBase.cs
34 6 2
public IEnumerable CreateHeroCards()
in CSharp/BotBuilderLocation/LocationCardBuilder.cs
34 7 3
protected override async Task MessageReceivedInternalAsync()
in CSharp/BotBuilderLocation/Dialogs/FavoriteLocationRetrieverDialog.cs
33 7 2
public string GetLocationMapImageUrl()
in CSharp/BotBuilderLocation/Azure/AzureMapsSpatialService.cs
30 5 2
private async Task CompleteFieldIfMissing()
in CSharp/BotBuilderLocation/Dialogs/LocationRequiredFieldsDialog.cs
30 5 5
private static Place CreatePlace()
in CSharp/BotBuilderLocation/LocationDialog.cs
29 4 1
function()
in Node/core/lib/dialogs/retrieve-facebook-location-dialog.js
29 6 3
function createDialog()
in Node/core/src/dialogs/edit-fravorite-location-dialog.ts
29 3 0
function createDialogStartHeroCard()
in Node/core/lib/botbuilder-location.js
28 4 0
function createDialogStartHeroCard()
in Node/core/src/botbuilder-location.ts
28 4 0
private void TryConfirmAndDelete()
in CSharp/BotBuilderLocation/Dialogs/FavoriteLocationRetrieverDialog.cs
27 2 2
private async Task TryResolveAddressAsync()
in CSharp/BotBuilderLocation/Dialogs/RichLocationRetrieverDialog.cs
26 4 2