microsoft / powerbi-powershell
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 352 units with 3,772 lines of code in units (38.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 10 medium complex units (546 lines of code)
    • 26 simple units (826 lines of code)
    • 316 very simple units (2,400 lines of code)
0% | 0% | 14% | 21% | 63%
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
cs0% | 0% | 14% | 21% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Modules/Profile0% | 0% | 40% | 29% | 29%
src/Modules/Reports0% | 0% | 40% | 12% | 47%
src/Modules/Data0% | 0% | 20% | 30% | 48%
src/Modules/Workspaces0% | 0% | 26% | 19% | 54%
src/Common/Commands.Common0% | 0% | 9% | 31% | 59%
src/Common/Common.Api0% | 0% | 0% | 15% | 84%
src/Common/Common.Authentication0% | 0% | 0% | 21% | 78%
src/Modules/Admin0% | 0% | 0% | 23% | 76%
src/Common/Common.Client0% | 0% | 0% | 0% | 100%
src/Common/Common.Abstractions0% | 0% | 0% | 0% | 100%
src/Modules/Capacities0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public override void ExecuteCmdlet()
in src/Modules/Workspaces/Commands.Workspaces/GetPowerBIWorkspace.cs
47 20 0
private async Task InvokeRestMethod()
in src/Modules/Profile/Commands.Profile/InvokePowerBIRestMethod.cs
83 15 3
public override void ExecuteCmdlet()
in src/Modules/Data/Commands.Data/GetPowerBIDataflow.cs
50 12 0
public override void ExecuteCmdlet()
in src/Modules/Data/Commands.Data/GetPowerBIDataset.cs
51 12 0
public override void ExecuteCmdlet()
in src/Modules/Reports/Commands.Reports/GetPowerBIDashboard.cs
51 12 0
public override void ExecuteCmdlet()
in src/Modules/Reports/Commands.Reports/GetPowerBIReport.cs
51 12 0
protected virtual string ResolveFilePath()
in src/Common/Commands.Common/PowerBICmdlet.cs
50 11 2
public override void ExecuteCmdlet()
in src/Modules/Profile/Commands.Profile/ConnectPowerBIServiceAccount.cs
87 11 0
public override void ExecuteCmdlet()
in src/Modules/Reports/Commands.Reports/GetPowerBIImport.cs
49 11 0
protected override void BeginProcessing()
in src/Modules/Workspaces/Commands.Workspaces/GetPowerBIWorkspace.cs
27 11 0
public PowerBISettings()
in src/Common/Commands.Common/PowerBISettings.cs
75 10 3
protected virtual void Dispose()
in src/Common/Common.Api/PowerBIApiClient.cs
40 10 1
public override void ExecuteCmdlet()
in src/Modules/Profile/Commands.Profile/InvokePowerBIRestMethod.cs
48 10 0
private async Task HandleAuthentication()
in src/Common/Common.Authentication/WindowsAuthenticationFactory.cs
48 9 6
private static Assembly RedirectAssemblyLoad()
in src/Common/Commands.Common/PowerBICmdlet.cs
33 8 2
public void FlushMessages()
in src/Common/Commands.Common/PowerBILogger.cs
32 8 0
public void WriteHost()
in src/Common/Commands.Common/PowerBILogger.cs
30 8 3
public Report PostReport()
in src/Common/Common.Api/Reports/ReportsClient.cs
31 8 4
public Report PostReportForWorkspace()
in src/Common/Common.Api/Reports/ReportsClient.cs
31 8 5
public override void ExecuteCmdlet()
in src/Modules/Data/Commands.Data/ExportPowerBIDataflow.cs
44 8 0