microsoft / AmbariBasedHadoopExporter
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 55 units with 1,020 lines of code in units (35.9% 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)
    • 1 simple units (25 lines of code)
    • 54 very simple units (995 lines of code)
0% | 0% | 0% | 2% | 97%
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% | 2% | 97%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Infrastructure/Providers0% | 0% | 0% | 33% | 66%
src/Core/Exporters0% | 0% | 0% | 0% | 100%
src/App/Services0% | 0% | 0% | 0% | 100%
src/Infrastructure/Extensions0% | 0% | 0% | 0% | 100%
src/App/Logging0% | 0% | 0% | 0% | 100%
src/App0% | 0% | 0% | 0% | 100%
src/Core/Extensions0% | 0% | 0% | 0% | 100%
src/Infrastructure/Utils0% | 0% | 0% | 0% | 100%
src/Core/Models0% | 0% | 0% | 0% | 100%
src/App/Middlewares0% | 0% | 0% | 0% | 100%
src/Core/Configurations0% | 0% | 0% | 0% | 100%
src/Core/Utils0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public async Task GetResponseContentAsync()
in src/Infrastructure/Providers/Concrete/AmbariApiContentProvider.cs
25 6 1
internal async Task RunExportersAsync()
in src/App/Services/Hosted/PrometheusExporterHostedService.cs
38 5 0
public static void AddSecretProvider()
in src/Infrastructure/Extensions/SecretConfigurationExtension.cs
27 5 2
public void ReportGauge()
in src/Infrastructure/Utils/PrometheusUtils.cs
25 5 5
public LogModel()
in src/App/Logging/LogModel.cs
20 4 2
internal string GetFullEndpointUrl()
in src/Core/Exporters/Concrete/BaseExporter.cs
14 4 1
public override bool IsValid()
in src/Core/Utils/AmbariUriAttribute.cs
6 4 1
public IReadOnlyDictionary GetSecretNameToValueMap()
in src/Infrastructure/Providers/Concrete/FileSecretProvider.cs
22 4 0
public async Task ValidateAsync()
in src/App/Middlewares/Concrete/ConfigurationsValidator.cs
11 3 0
public static async Task Main()
in src/App/Program.cs
38 3 1
internal async void HealthCheck()
in src/App/Services/Hosted/LivenessHostedService.cs
16 3 1
internal List ExportHostsMetricsAsync()
in src/Core/Exporters/Concrete/ClusterExporter.cs
17 3 1
internal static void TryAdd()
in src/Core/Extensions/DictionaryExtensions.cs
12 3 2
public static async Task ValidateConfigurationAsync()
in src/App/Services/ConfigurationValidationExtensions.cs
8 2 1
public void Validate()
in src/Core/Configurations/BaseValidatableConfiguration.cs
9 2 0
public async Task ExportMetricsAsync()
in src/Core/Exporters/Concrete/BaseExporter.cs
40 2 1
protected override async Task ReportMetrics()
in src/Core/Exporters/Concrete/YarnResourceManagerExporter.cs
65 2 1
public IEnumerable GetChildrenQueuesIEnumerable()
in src/Core/Models/AmbariResponseEntities/YarnResourceManager/Queue.cs
11 2 0
private static Dictionary MapConfigToSecretValueWithSecretAsKey()
in src/Infrastructure/Extensions/SecretConfigurationExtension.cs
11 2 3
private static string GetSecret()
in src/Infrastructure/Providers/Concrete/FileSecretProvider.cs
10 2 1