microsoft / Cognitive-Samples-IntelligentKiosk
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,403 units with 18,301 lines of code in units (52.6% of code).
    • 2 very long units (239 lines of code)
    • 31 long units (1,999 lines of code)
    • 203 medium size units (6,182 lines of code)
    • 359 small units (5,361 lines of code)
    • 808 very small units (4,520 lines of code)
1% | 10% | 33% | 29% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs1% | 10% | 33% | 29% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Kiosk/Views1% | 10% | 37% | 29% | 21%
Kiosk/ServiceHelpers7% | 7% | 30% | 24% | 29%
Kiosk/Controls0% | 14% | 26% | 26% | 31%
Kiosk0% | 9% | 29% | 36% | 24%
Kiosk/Models0% | 0% | 0% | 78% | 21%
Kiosk/Extensions0% | 0% | 0% | 62% | 37%
Kiosk/KioskRuntimeComponent0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public async Task AddImage()
in Kiosk/Views/DigitalAssetManagement/ImageInsightsViewModel.cs
127 29 1
private static async Task FindSimilarOrInsertAsync()
in Kiosk/ServiceHelpers/FaceListManager.cs
112 24 4
private void UpdateResultDetails()
in Kiosk/Views/FaceApiExplorer/FaceApiExplorerPage.xaml.cs
96 38 0
private async Task ProcessPeopleInsightsAsync()
in Kiosk/Views/VideoInsights/VideoInsightsPage.xaml.cs
94 17 2
private async Task UpdateResultsAsync()
in Kiosk/Views/VisionApiExplorer.xaml.cs
89 15 1
IEnumerable GetFaceAttributesFlags()
in Kiosk/Views/DigitalAssetManagement/ImageInsightsViewModel.cs
88 24 1
private async Task AnalyzeTextAsync()
in Kiosk/Views/TextAnalyticsExplorer/TextAnalyticsExplorer.xaml.cs
76 19 0
private void UpdateActiveDemos()
in Kiosk/Views/DemoLauncher/DemoLauncherPage.xaml.cs
75 19 0
private void LoadAppRoamingSettings()
in Kiosk/SettingsHelper.cs
72 16 0
private async Task ExportOnnxProject()
in Kiosk/Views/CustomVision/CustomVisionSetup.xaml.cs
70 7 2
void SetOffset()
in Kiosk/Controls/Overlays/Primitives/OverlayLabel.xaml.cs
69 15 0
private async Task AnalyzeNewsAsync()
in Kiosk/Views/BingNewsAnalytics.xaml.cs
69 11 2
private async void OnSubmitClaimButtonClicked()
in Kiosk/Views/InsuranceClaimAutomation/InsuranceClaimAutomation.xaml.cs
67 11 2
public async Task StartStreamAsync()
in Kiosk/Controls/CameraControl.xaml.cs
64 15 2
void SetPosition()
in Kiosk/Controls/Overlays/Primitives/OverlayLabel.xaml.cs
63 14 0
public static async Task UpdatePersonGroupsWithNewRecModelAsync()
in Kiosk/ServiceHelpers/FaceServiceHelper.cs
63 14 3
private void UpdateDemographics()
in Kiosk/Views/RealTimeDemo.xaml.cs
63 11 1
private async void UpdateResults()
in Kiosk/Views/CustomVision/CustomVisionExplorer.xaml.cs
60 8 1
private void ShowFaceTrackingVisualization()
in Kiosk/Controls/CameraControl.xaml.cs
59 16 2
private async Task StartLiveDemoProcessAsync()
in Kiosk/Views/AnomalyDetector/AnomalyChartControl.xaml.cs
59 6 0