microsoft / Application-Insights-Istio-Adapter
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 125 units with 2,518 lines of code in units (70.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (119 lines of code)
    • 8 simple units (297 lines of code)
    • 115 very simple units (2,102 lines of code)
0% | 0% | 4% | 11% | 83%
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% | 4% | 11% | 83%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Library0% | 0% | 16% | 25% | 58%
src/LibraryTest/Library/Inputs0% | 0% | 0% | 39% | 60%
src/ConsoleHost0% | 0% | 0% | 83% | 16%
src/LibraryTest/Library0% | 0% | 0% | 0% | 100%
src/LibraryTest0% | 0% | 0% | 0% | 100%
src/Library/Inputs/GrpcInput0% | 0% | 0% | 0% | 100%
src/Common0% | 0% | 0% | 0% | 100%
src/LibraryTest/Common0% | 0% | 0% | 0% | 100%
src/Library/Inputs0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public IEnumerable Generate()
in src/Library/TelemetryGenerator.cs
90 21 1
private void DetermineInterest()
in src/Library/TelemetryGenerator.cs
29 18 9
public async Task GrpcInputTests_StopsAndRestarts()
in src/LibraryTest/Library/Inputs/GrpcInputTests.cs
32 9 0
private static Uri GetUrl()
in src/Library/TelemetryGenerator.cs
29 8 4
static void Main()
in src/ConsoleHost/Program.cs
54 7 1
public void Run()
in src/Library/Host.cs
30 7 2
public Library()
in src/Library/Library.cs
70 7 1
private RequestTelemetry GenerateRequest()
in src/Library/TelemetryGenerator.cs
42 7 23
private static string GetHttpTelemetryName()
in src/Library/TelemetryGenerator.cs
16 7 3
public async Task GrpcInputTests_StopsWhileWaitingForData()
in src/LibraryTest/Library/Inputs/GrpcInputTests.cs
24 6 0
internal void ListenerCallbackAsync()
in src/Library/ClusterInfoListener.cs
43 5 1
public bool UpdateClusterId()
in src/Library/HeartbeatCustomizer.cs
33 5 1
private void OnDataReceived()
in src/Library/Inputs/GrpcInput/GrpcInput.cs
28 5 2
public async Task GrpcInputTests_HandlesExceptionsInProcessingHandler()
in src/LibraryTest/Library/Inputs/GrpcInputTests.cs
18 5 0
static Diagnostics()
in src/Common/Diagnostics.cs
25 4 0
public void Run()
in src/Library/Library.cs
29 4 0
private void OnDataReceived()
in src/Library/Library.cs
17 4 1
private async Task TraceStatsWorker()
in src/Library/Library.cs
18 4 0
public ClusterInfoListener()
in src/Library/ClusterInfoListener.cs
16 3 1
public void Start()
in src/Library/ClusterInfoListener.cs
21 3 0