microsoft / ApplicationInsights-Kubernetes
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 97 units with 956 lines of code in units (46.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 4 simple units (160 lines of code)
    • 93 very simple units (796 lines of code)
0% | 0% | 0% | 16% | 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% | 0% | 16% | 83%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/ApplicationInsights.Kubernetes0% | 0% | 0% | 51% | 48%
src/ApplicationInsights.Kubernetes/K8sHttpClient0% | 0% | 0% | 21% | 78%
src/ApplicationInsights.Kubernetes/TelemetryInitializers0% | 0% | 0% | 27% | 72%
src/ApplicationInsights.Kubernetes/Extensions0% | 0% | 0% | 0% | 100%
src/ApplicationInsights.Kubernetes/Debuggings0% | 0% | 0% | 0% | 100%
src/ApplicationInsights.Kubernetes/EntityExtensions0% | 0% | 0% | 0% | 100%
src/ApplicationInsights.Kubernetes/Utilities0% | 0% | 0% | 0% | 100%
dev/F5WebApi0% | 0% | 0% | 0% | 100%
troubleshooting/AIK8sTroubleShooting0% | 0% | 0% | 0% | 100%
dev/F5WebApi/Controllers0% | 0% | 0% | 0% | 100%
troubleshooting/AIK8sTroubleShooting/Controllers0% | 0% | 0% | 0% | 100%
src/ApplicationInsights.Kubernetes.HostingStartup0% | 0% | 0% | 0% | 100%
src/ApplicationInsights.Kubernetes/Entities0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public async Task CreateAsync()
in src/ApplicationInsights.Kubernetes/K8sEnvironmentFactory.cs
67 10 1
public KubeHttpSettingsWinContainerProvider()
in src/ApplicationInsights.Kubernetes/K8sHttpClient/KubeHttpSettingsWinContainerProvider.cs
38 7 6
public void Initialize()
in src/ApplicationInsights.Kubernetes/TelemetryInitializers/KubernetesTelemetryInitializer.cs
31 7 1
public async Task GetMyPodAsync()
in src/ApplicationInsights.Kubernetes/K8sQueryClient.cs
24 6 0
public static K8sReplicaSet GetMyReplicaSet()
in src/ApplicationInsights.Kubernetes/EntityExtensions/PodExtensions.cs
13 5 2
private async Task SpinWaitContainerReady()
in src/ApplicationInsights.Kubernetes/K8sEnvironmentFactory.cs
27 5 3
public void Initialize()
in src/ApplicationInsights.Kubernetes/TelemetryInitializers/SimplePerformanceCounterTelemetryInitializer.cs
27 5 1
private async Task SpinWaitUntilGetPod()
in src/ApplicationInsights.Kubernetes/K8sEnvironmentFactory.cs
29 4 2
public static K8sDeployment GetMyDeployment()
in src/ApplicationInsights.Kubernetes/EntityExtensions/ReplicaSetExtensions.cs
13 3 2
public IServiceCollection RegisterServices()
in src/ApplicationInsights.Kubernetes/Extensions/KubernetesServiceCollectionBuilder.cs
22 3 1
protected virtual void RegisterSettingsProvider()
in src/ApplicationInsights.Kubernetes/Extensions/KubernetesServiceCollectionBuilder.cs
15 3 1
public KubeHttpClientSettingsBase()
in src/ApplicationInsights.Kubernetes/K8sHttpClient/KubeHttpClientSettingsBase.cs
18 3 2
internal bool CertificateValidationCallBack()
in src/ApplicationInsights.Kubernetes/K8sHttpClient/KubeHttpClientSettingsBase.cs
30 3 5
public static string GetReadableSize()
in src/ApplicationInsights.Kubernetes/Utilities/StringUtils.cs
12 3 1
public void Configure()
in dev/F5WebApi/Startup.cs
13 2 2
private void WriteLine()
in src/ApplicationInsights.Kubernetes/Debuggings/ApplicationInsightsKubernetesDiagnosticObserver.cs
7 2 2
private void Write()
in src/ApplicationInsights.Kubernetes/Debuggings/ApplicationInsightsKubernetesDiagnosticSource.cs
11 2 3
public static Type GetKind()
in src/ApplicationInsights.Kubernetes/EntityExtensions/OwnerReferenceExtensions.cs
10 2 1
public static ContainerStatus GetContainerStatus()
in src/ApplicationInsights.Kubernetes/EntityExtensions/PodExtensions.cs
6 2 2
public static IServiceCollection AddApplicationInsightsKubernetesEnricher()
in src/ApplicationInsights.Kubernetes/Extensions/ApplicationInsightsExtensions.cs
12 2 4