microsoft / dicom-server
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 1,073 units with 12,875 lines of code in units (40.1% of code).
    • 1 very complex units (74 lines of code)
    • 0 complex units (0 lines of code)
    • 7 medium complex units (351 lines of code)
    • 50 simple units (1,721 lines of code)
    • 1,015 very simple units (10,729 lines of code)
<1% | 0% | 2% | 13% | 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
cs<1% | 0% | 2% | 12% | 83%
js0% | 0% | 0% | 95% | 4%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Microsoft.Health.Dicom.Core1% | 0% | <1% | 13% | 84%
converter/dicom-cast0% | 0% | 5% | 11% | 83%
src/Microsoft.Health.Dicom.Api0% | 0% | 6% | 18% | 75%
src/Microsoft.Health.Dicom.SqlServer0% | 0% | 3% | 9% | 87%
tools/scale-testing0% | 0% | 0% | 20% | 79%
tools/dicom-web-electron0% | 0% | 0% | 95% | 4%
src/Microsoft.Health.Dicom.Client0% | 0% | 0% | 11% | 88%
src/Microsoft.Health.Dicom.Blob0% | 0% | 0% | 0% | 100%
src/Microsoft.Health.Dicom.Operations0% | 0% | 0% | 0% | 100%
src/Microsoft.Health.Dicom.Operations.Client0% | 0% | 0% | 0% | 100%
src/Microsoft.Health.Dicom.Web0% | 0% | 0% | 0% | 100%
src/Microsoft.Health.Dicom.Functions0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public static bool CanTranscodeDataset()
in src/Microsoft.Health.Dicom.Core/Features/Retrieve/DicomDatasetExtensions.cs
74 51 2
private IActionResult MapExceptionToResult()
in src/Microsoft.Health.Dicom.Api/Features/Exceptions/ExceptionHandlingMiddleware.cs
59 19 1
private void Initialize()
in src/Microsoft.Health.Dicom.Core/Features/Query/QueryResponseBuilder.cs
35 15 1
private static bool IsBuiltInType()
in src/Microsoft.Health.Dicom.Api/Features/Swagger/ReflectionTypeFilter.cs
22 13 1
public async Task ProcessAsync()
in converter/dicom-cast/src/Microsoft.Health.DicomCast.Core/Features/Worker/ChangeFeedProcessor.cs
65 12 2
public async Task ProcessAsync()
in converter/dicom-cast/src/Microsoft.Health.DicomCast.Core/Features/Worker/FhirTransaction/FhirTransactionPipeline.cs
68 12 2
public override void OnActionExecuting()
in src/Microsoft.Health.Dicom.Api/Features/Filters/AcceptContentFilterAttribute.cs
39 12 1
private void AppendExtendedQueryTagTables()
in src/Microsoft.Health.Dicom.SqlServer/Features/Query/SqlQueryGenerator.cs
63 12 0
public void Synchronize()
in converter/dicom-cast/src/Microsoft.Health.DicomCast.Core/Features/Worker/FhirTransaction/Patient/PatientNameSynchronizer.cs
47 10 3
public void Apply()
in src/Microsoft.Health.Dicom.Api/Features/Swagger/SwaggerDefaultValues.cs
38 10 2
public QueryParser()
in src/Microsoft.Health.Dicom.Core/Features/Query/QueryParser.cs
49 10 1
private static string GetTableAlias()
in src/Microsoft.Health.Dicom.SqlServer/Features/Query/SqlQueryGenerator.cs
37 10 2
private static HttpStatusCode ValidateBundleEntryAndGetStatusCode()
in converter/dicom-cast/src/Microsoft.Health.DicomCast.Core/Features/Fhir/FhirTransactionExecutor.cs
32 9 2
public void Apply()
in src/Microsoft.Health.Dicom.Api/Features/Swagger/ErrorCodeOperationFilter.cs
25 9 2
private static async Task ProcessMessagesAsync()
in tools/scale-testing/MessageHandler/Program.cs
27 9 2
public async override Task OnActionExecutionAsync()
in src/Microsoft.Health.Dicom.Api/Features/Filters/PopulateDataPartitionFilterAttribute.cs
30 8 2
internal AspNetCoreMultipartReader()
in src/Microsoft.Health.Dicom.Api/Web/AspNetCoreMultipartReader.cs
43 8 4
private bool ParseFilterCondition()
in src/Microsoft.Health.Dicom.Core/Features/Query/QueryParser.cs
32 8 4
private async Task ProcessDicomInstanceEntryAsync()
in src/Microsoft.Health.Dicom.Core/Features/Store/StoreService.cs
52 8 2
private static void ValidateInstanceIdentifiersAreNotDuplicate()
in src/Microsoft.Health.Dicom.Core/Messages/Retrieve/RetrieveRequestValidator.cs
21 8 4