microsoft / Omex
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 191 units with 2,609 lines of code in units (50.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (64 lines of code)
    • 13 simple units (447 lines of code)
    • 177 very simple units (2,098 lines of code)
0% | 0% | 2% | 17% | 80%
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% | 2% | 17% | 80%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Logging0% | 0% | 14% | 15% | 70%
src/CodeGenerators0% | 0% | 0% | 48% | 51%
src/Activities0% | 0% | 0% | 31% | 68%
src/Diagnostics.HealthChecks0% | 0% | 0% | 12% | 87%
src/Services.Remoting0% | 0% | 0% | 14% | 85%
src/Hosting.Services.Web0% | 0% | 0% | 5% | 94%
src/Hosting0% | 0% | 0% | 16% | 83%
src/Hosting.Services0% | 0% | 0% | 0% | 100%
src/Abstractions0% | 0% | 0% | 0% | 100%
src/ServiceFabricGuest.Abstractions0% | 0% | 0% | 0% | 100%
src/Testing.Helpers0% | 0% | 0% | 0% | 100%
src/Hosting.Services.Remoting0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public void LogMessage()
in src/Logging/Internal/EventSource/OmexLogEventSender.cs
64 12 7
public IList GetAttributes()
in src/CodeGenerators/SettingsGen/Wrappers/GeneratorSyntaxContextWrapper.cs
36 9 1
public void SendActivityMetric()
in src/Activities/Internal/EventSource/ActivityEventSender.cs
75 8 1
public static IHealthChecksBuilder AddHttpEndpointCheck()
in src/Diagnostics.HealthChecks/HealthChecksBuilderExtensions.cs
47 8 11
private static X509Certificate2? PickBestCertificate()
in src/Hosting/Certificates/CertificateReader.cs
18 8 1
public void Execute()
in src/CodeGenerators/SettingsGen/BaseGenerator.cs
36 7 1
protected override bool ShouldGenerateFile()
in src/CodeGenerators/SettingsGen/SettingsGenerator.cs
34 7 2
private static Guid? ExtractCorrelationIdFromQuery()
in src/Hosting.Services.Web/Middlewares/ObsoleteCorrelationHeadersMiddleware.cs
22 7 1
public void Log()
in src/Logging/Internal/OmexLogger.cs
25 7 5
public static string ToTagId()
in src/Logging/TagsExtensions.cs
44 7 1
public void OnStart()
in src/Activities/Internal/ActivityObserver.cs
39 6 2
public void OnVisitSyntaxNode()
in src/CodeGenerators/SettingsGen/Parser/SettingsFromAttributeParser.cs
19 6 1
private void LoadParameterFromAttribute()
in src/CodeGenerators/SettingsGen/Parser/SettingsFromAttributeParser.cs
24 6 3
public static Activity? StartActivityFromIncomingRequest()
in src/Services.Remoting/OmexRemotingHeadersExtensions.cs
28 6 3
public void SendActivityMetric()
in src/Activities/Internal/ActivityMetricsSender.cs
29 5 1
protected override async Task CheckHealthInternalAsync()
in src/Diagnostics.HealthChecks/Internal/HttpEndpointHealthCheck.cs
29 5 2
private static HttpRequestMessage CloneRequestMessage()
in src/Diagnostics.HealthChecks/Internal/HttpEndpointHealthCheck.cs
27 5 1
protected string BuildHealthSummaryDescription()
in src/Diagnostics.HealthChecks/Internal/OmexHealthCheckPublisher.cs
42 5 1
public static IHost BuildStatelessWebService()
in src/Hosting.Services.Web/HostBuilderExtensions.cs
59 5 6
private static string? ExtractParameter()
in src/Hosting.Services.Web/Middlewares/ObsoleteCorrelationHeadersMiddleware.cs
16 5 2