awslabs / amazon-timestream-tools
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 910 units with 16,264 lines of code in units (75.4% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (571 lines of code)
    • 19 medium complex units (1,819 lines of code)
    • 50 simple units (1,963 lines of code)
    • 838 very simple units (11,911 lines of code)
0% | 3% | 11% | 12% | 73%
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
go0% | 9% | 16% | 14% | 59%
cs0% | 6% | 0% | 12% | 80%
py0% | 0% | 28% | 17% | 54%
java0% | 0% | 5% | 10% | 83%
js0% | 0% | 5% | 2% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
sample_apps_reinvent2021/goV20% | 10% | 8% | 15% | 65%
sample_apps_reinvent2021/go0% | 11% | 4% | 14% | 69%
sample_apps_reinvent2021/dotnet0% | 9% | 0% | 9% | 80%
sample_apps/go0% | 0% | 69% | 10% | 19%
tools/perf-scale-workload0% | 0% | 41% | 22% | 36%
sample_apps_reinvent2021/python0% | 0% | 31% | 6% | 62%
sample_apps_reinvent2021/java0% | 0% | 11% | 4% | 83%
sample_apps_reinvent2021/javaV20% | 0% | 9% | 4% | 85%
sample_apps_reinvent2021/js0% | 0% | 7% | 1% | 90%
integrations/sagemaker0% | 0% | 45% | 11% | 42%
sample_apps/python0% | 0% | 17% | 0% | 82%
sample_apps/java0% | 0% | 5% | 18% | 76%
sample_apps/dotnet0% | 0% | 0% | 19% | 80%
sample_apps/javaV20% | 0% | 0% | 22% | 77%
tools/continuous-ingestor0% | 0% | 0% | 43% | 56%
integrations/flink_connector_with_upserts0% | 0% | 0% | 21% | 78%
integrations/flink_connector0% | 0% | 0% | 24% | 76%
tools/multithreaded-writer0% | 0% | 0% | 9% | 90%
tools/kinesis_ingestor0% | 0% | 0% | 40% | 59%
sample_apps/js0% | 0% | 0% | 3% | 96%
integrations/jdbc0% | 0% | 0% | 0% | 100%
integrations/iot_core0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func main()
in sample_apps_reinvent2021/go/scheduled-query-sample.go
198 34 0
func main()
in sample_apps_reinvent2021/goV2/scheduled-query-sample.go
200 34 0
public async Task RunScheduledQueryExample()
in sample_apps_reinvent2021/dotnet/ScheduledQueryExample.cs
173 28 2
def executeQuery()
in tools/perf-scale-workload/timestreamquery.py
75 24 4
private static void scheduledQueryExamples()
in sample_apps_reinvent2021/javaV2/src/main/java/com/amazonaws/services/timestream/Main.java
114 24 5
public static void scheduledQueryExamples()
in sample_apps_reinvent2021/java/src/main/java/com/amazonaws/services/timestream/Main.java
110 23 6
def executeQuery()
in integrations/sagemaker/timestreamquery.py
65 20 4
async function scheduledQueryExamples()
in sample_apps_reinvent2021/js/main.js
92 18 0
func main()
in sample_apps/go/crud-ingestion-sample.go
350 18 0
func main()
in sample_apps_reinvent2021/goV2/ingestion-csv-sample.go
102 17 0
def run()
in tools/perf-scale-workload/continuous_ingester.py
91 16 1
def __init__()
in sample_apps_reinvent2021/python/utils/QueryUtil.py
210 15 4
def run()
in tools/perf-scale-workload/query_executer.py
79 14 1
def printModelSummary()
in tools/perf-scale-workload/model.py
38 14 5
func main()
in sample_apps/go/ingestion-csv-sample.go
130 14 0
func()
in sample_apps_reinvent2021/goV2/utils/timestream-dependency-helper.go
62 13 1
def executeQueryInstance()
in tools/perf-scale-workload/query_execution_utils.py
43 12 8
func main()
in sample_apps_reinvent2021/go/ingestion-csv-sample.go
74 12 0
private String parseScalarType()
in sample_apps_reinvent2021/java/src/main/java/com/amazonaws/services/timestream/QueryExample.java
31 12 2
private String parseScalarType()
in sample_apps/java/src/main/java/com/amazonaws/services/timestream/QueryExample.java
31 12 2