aws-samples / aws-dataexchange-api-samples
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 30 units with 415 lines of code in units (37.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (83 lines of code)
    • 2 simple units (50 lines of code)
    • 26 very simple units (282 lines of code)
0% | 0% | 20% | 12% | 67%
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
py0% | 0% | 28% | 17% | 54%
ts0% | 0% | 0% | 0% | 100%
cpp0% | 0% | 0% | 0% | 100%
go0% | 0% | 0% | 0% | 100%
cs0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
subscribers/python/tf-auto-export-to-s30% | 0% | 90% | 0% | 9%
subscribers/python/export-data-sets0% | 0% | 38% | 40% | 20%
subscribers/python/download-entitled-assets0% | 0% | 0% | 20% | 79%
subscribers/python/pandas-describe-csv0% | 0% | 0% | 0% | 100%
subscribers/javascript/auto-export-to-s30% | 0% | 0% | 0% | 100%
subscribers/cpp/all-entitled-datasets0% | 0% | 0% | 0% | 100%
subscribers/go/all-entitled-datasets0% | 0% | 0% | 0% | 100%
subscribers/dotnet/all-entitled-datasets0% | 0% | 0% | 0% | 100%
subscribers/java/all-entitled-datasets0% | 0% | 0% | 0% | 100%
subscribers/javascript/all-entitled-datasets0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def handler()
in subscribers/python/tf-auto-export-to-s3/index.py
55 12 2
def main()
in subscribers/python/export-data-sets/export-data-sets.py
28 11 4
def export_revisions()
in subscribers/python/export-data-sets/export-data-sets.py
29 8 4
def main()
in subscribers/python/download-entitled-assets/download-entitled-assets.py
21 6 1
def export_assets()
in subscribers/python/download-entitled-assets/download-entitled-assets.py
25 5 2
async function waitForJobCompletion()
in subscribers/javascript/auto-export-to-s3/lambda/exportToS3.ts
11 4 2
def export_asset()
in subscribers/python/pandas-describe-csv/pandas-describe-csv.py
23 4 2
def get_revisions()
in subscribers/python/export-data-sets/export-data-sets.py
15 4 1
func main()
in subscribers/go/all-entitled-datasets/all-entitled-datasets.go
16 3 0
int main()
in subscribers/cpp/all-entitled-datasets/main.cpp
27 3 2
def download_assets()
in subscribers/python/download-entitled-assets/download-entitled-assets.py
10 3 3
public static void main()
in subscribers/java/all-entitled-datasets/src/main/java/com/amazonaws/dataexchange/App.java
14 2 1
def grouper()
in subscribers/python/tf-auto-export-to-s3/index.py
6 2 2
def get_all_revisions()
in subscribers/python/download-entitled-assets/download-entitled-assets.py
11 2 1
def get_all_assets()
in subscribers/python/download-entitled-assets/download-entitled-assets.py
13 2 2
def get_entitled_data_sets()
in subscribers/python/download-entitled-assets/download-entitled-assets.py
11 2 0
static void Main()
in subscribers/dotnet/all-entitled-datasets/Program.cs
16 2 1
void async function()
in subscribers/javascript/all-entitled-datasets/index.ts
6 1 0
constructor()
in subscribers/javascript/auto-export-to-s3/cfn/lambda.ts
28 1 2
function sleep()
in subscribers/javascript/auto-export-to-s3/lambda/exportToS3.ts
3 1 1