microsoft / Windows.UI.Composition-Win32-Samples
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 748 units with 8,919 lines of code in units (63.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (61 lines of code)
    • 8 simple units (359 lines of code)
    • 739 very simple units (8,499 lines of code)
0% | 0% | <1% | 4% | 95%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cpp0% | 0% | <1% | 4% | 94%
h0% | 0% | 0% | 8% | 91%
cs0% | 0% | 0% | 1% | 98%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cpp/AdvancedColorImages/AdvancedColorImages0% | 0% | 6% | 19% | 74%
cpp/HelloComposition/HelloComposition0% | 0% | 0% | 16% | 83%
cpp/VirtualSurfaces/VirtualSurfaces0% | 0% | 0% | 11% | 88%
cpp/ScreenCaptureforHWND/ScreenCaptureforHWND0% | 0% | 0% | 9% | 90%
dotnet/WPF/ScreenCapture0% | 0% | 0% | 6% | 93%
cpp/HelloVectors0% | 0% | 0% | 0% | 100%
dotnet/WPF/VisualLayerIntegration0% | 0% | 0% | 0% | 100%
dotnet/WinForms/VisualLayerIntegration0% | 0% | 0% | 0% | 100%
dotnet/WPF/AcrylicEffect0% | 0% | 0% | 0% | 100%
dotnet/WinForms/AcrylicEffect0% | 0% | 0% | 0% | 100%
dotnet/WPF/HelloComposition0% | 0% | 0% | 0% | 100%
dotnet/WinForms/HelloComposition0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
LRESULT CALLBACK WndProc()
in cpp/AdvancedColorImages/AdvancedColorImages/AdvancedColorImages.cpp
61 11 4
void TileDrawingManager::UpdateVisibleRegion()
in cpp/AdvancedColorImages/AdvancedColorImages/TileDrawingManager.cpp
47 10 1
void TileDrawingManager::UpdateVisibleRegion()
in cpp/VirtualSurfaces/VirtualSurfaces/TileDrawingManager.cpp
47 10 1
void DirectXTileRenderer::PopulateImageInfoACKind()
in cpp/AdvancedColorImages/AdvancedColorImages/DirectXTileRenderer.cpp
19 8 1
LRESULT CALLBACK WndProc()
in cpp/HelloComposition/HelloComposition/HelloComposition.cpp
53 8 4
bool IsAltTabWindow()
in cpp/ScreenCaptureforHWND/ScreenCaptureforHWND/Win32WindowEnumeration.h
36 8 1
public static bool IsWindowValidForCapture()
in dotnet/WPF/ScreenCapture/ScreenCapture/WindowEnumerationHelper.cs
31 8 1
void DirectXTileRenderer::ComputeHdrMetadata()
in cpp/AdvancedColorImages/AdvancedColorImages/DirectXTileRenderer.cpp
38 7 0
ImageInfo DirectXTileRenderer::LoadImageCommon()
in cpp/AdvancedColorImages/AdvancedColorImages/DirectXTileRenderer.cpp
88 6 1
INT_PTR CALLBACK About()
in cpp/AdvancedColorImages/AdvancedColorImages/AdvancedColorImages.cpp
17 5 4
INT_PTR CALLBACK About()
in cpp/HelloComposition/HelloComposition/HelloComposition.cpp
17 5 4
LRESULT MessageHandler()
in cpp/HelloVectors/desktopcompositionwindow.h
26 5 3
bool DirectXTileRenderer::DrawTileRange()
in cpp/VirtualSurfaces/VirtualSurfaces/DirectXTileRenderer.cpp
33 5 2
int APIENTRY wWinMain()
in cpp/AdvancedColorImages/AdvancedColorImages/AdvancedColorImages.cpp
27 4 4
bool DirectXTileRenderer::DrawTile()
in cpp/AdvancedColorImages/AdvancedColorImages/DirectXTileRenderer.cpp
33 4 1
bool DirectXTileRenderer::CheckForDeviceRemoved()
in cpp/AdvancedColorImages/AdvancedColorImages/DirectXTileRenderer.cpp
13 4 1
void DirectXTileRenderer::UpdateWhiteLevelScale()
in cpp/AdvancedColorImages/AdvancedColorImages/DirectXTileRenderer.cpp
23 4 2
int APIENTRY wWinMain()
in cpp/HelloComposition/HelloComposition/HelloComposition.cpp
26 4 4
IFACEMETHODIMP GetProperty()
in cpp/HelloComposition/HelloComposition/microsoft.ui.composition.effects_impl.h
13 4 2
void SimpleCapture::OnFrameArrived()
in cpp/ScreenCaptureforHWND/ScreenCaptureforHWND/SimpleCapture.cpp
38 4 2