microsoft / BusinessPlatformApps
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 1,320 units with 21,954 lines of code in units (39.2% of code).
    • 9 very long units (1,108 lines of code)
    • 54 long units (3,522 lines of code)
    • 279 medium size units (8,711 lines of code)
    • 345 small units (5,099 lines of code)
    • 633 very small units (3,514 lines of code)
5% | 16% | 39% | 23% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs4% | 17% | 41% | 21% | 15%
csx18% | 13% | 28% | 31% | 8%
ts0% | 6% | 38% | 29% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Source/Apps/Microsoft33% | 0% | 23% | 28% | 14%
Functions/FunctionCode/Twitter30% | 12% | 36% | 10% | 9%
Source/Actions/Microsoft.Deployment.Actions.Salesforce13% | 50% | 26% | 6% | 2%
Source/Actions/Microsoft.Deployment.Actions.AzureCustom2% | 30% | 45% | 17% | 4%
Functions/Code/Facebook9% | 13% | 27% | 38% | 10%
Source/Actions/Microsoft.Deployment.Actions.MsCrm20% | 11% | 46% | 13% | 8%
Functions/Code/Reddit0% | 13% | 31% | 22% | 32%
Source/SiteCommon/Web0% | 7% | 37% | 31% | 23%
Source/Actions/Microsoft.Deployment.Common0% | 5% | 33% | 26% | 34%
Functions/FunctionCode/News0% | 22% | 45% | 25% | 6%
Source/Site/Microsoft.Deployment.Site.Service0% | 31% | 50% | 12% | 5%
Functions/FunctionCode/AnalysisServices0% | 55% | 31% | 12% | 0%
Source/Actions/Microsoft.Deployment.Actions.OnPremise0% | 16% | 40% | 35% | 7%
Source/Actions/Microsoft.Deployment.Actions.Custom0% | 3% | 58% | 23% | 15%
Source/Actions/Microsoft.Deployment.Actions.SQL0% | 20% | 41% | 37% | 0%
Source/Actions/Microsoft.Deployment.Actions.Common0% | 0% | 78% | 6% | 15%
Source/Site/Microsoft.Deployment.Site.Msi0% | 0% | 47% | 7% | 45%
Functions/FunctionCode/FacebookPageAnalytics0% | 0% | 0% | 85% | 14%
Functions/FunctionCode/FacebookBrandMangement0% | 0% | 0% | 80% | 20%
Source/Apps/Partner0% | 0% | 0% | 46% | 53%
Source/Site/Microsoft.Deployment.Site.Web0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
csx
public static async Task Run()
in Source/Apps/Microsoft/Released/Microsoft-IoTContinuousDataExportTemplate/Service/Data/measurements/run.csx
156 18 3
public async Task ParseTweet()
in Functions/FunctionCode/Twitter/TweetProcessingFunction/TweetFunctionCSharp.cs
146 23 3
public async Task ParseTweet()
in Source/Apps/Microsoft/Released/Microsoft-TwitterTemplate/Service/Data/TweetFunctionCSharp.cs
146 24 3
public override async Task ExecuteActionAsync()
in Source/Actions/Microsoft.Deployment.Actions.Salesforce/ADFDeployPipelines.cs
119 17 1
csx
public static async Task Run()
in Source/Apps/Microsoft/Released/Microsoft-IoTContinuousDataExportTemplate/Service/Data/devices/run.csx
118 8 2
public override async Task ExecuteActionAsync()
in Source/Actions/Microsoft.Deployment.Actions.AzureCustom/ActivityLogs/GetHistoricalData.cs
112 24 1
csx
public static async Task Run()
in Source/Apps/Microsoft/Released/Microsoft-IoTContinuousDataExportTemplate/Service/Data/deviceTemplates/run.csx
107 5 2
public static async Task PopulateMeasures()
in Functions/Code/Facebook/FacebookUtillity/PageAnalyticsETL.cs
102 7 5
public override async Task ExecuteActionAsync()
in Source/Actions/Microsoft.Deployment.Actions.MsCrm/CrmCreateVaultSecret.cs
102 10 1
public override async Task ExecuteActionAsync()
in Source/Actions/Microsoft.Deployment.Actions.AzureCustom/Reddit/RetrieveSocialGistApiKey.cs
96 11 1
private StringBuilder CreateQuery()
in Source/Actions/Microsoft.Deployment.Actions.Salesforce/ADFDeployPipelines.cs
89 13 5
public override async Task ExecuteActionAsync()
in Source/Actions/Microsoft.Deployment.Actions.Salesforce/ADFDeployLinkedServices.cs
88 8 1
public static void SetRight()
in Source/Actions/Microsoft.Deployment.Common/Helpers/NTPermissionUtility.cs
84 9 4
csx
public List CleanWords()
in Functions/FunctionCode/News/AbstractExtractor/run.csx
83 18 1
public static void PopulatePostCommentsAndReactions()
in Functions/Code/Facebook/FacebookUtillity/MainETL.cs
82 7 6
public static DataTable RunCommand()
in Source/Actions/Microsoft.Deployment.Common/Helpers/SqlUtility.cs
80 13 5
public override async Task ExecuteActionAsync()
in Source/Actions/Microsoft.Deployment.Actions.AzureCustom/Common/DeployAzureFunctionAssets.cs
79 9 1
csx
public static async Task Run()
in Functions/FunctionCode/AnalysisServices/run.csx
78 8 2
public override async Task ExecuteActionAsync()
in Source/Actions/Microsoft.Deployment.Actions.AzureCustom/Reddit/DeployRedditAzureMLWebServiceFromFile.cs
78 7 1
public async Task WaitForJobCompletion()
in Functions/Code/Reddit/Src/RedditCore/AzureML/ExperimentCompletionWaiter.cs
77 11 3