aws-samples / amazon-forecast-continuous-training-demo
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 680 lines of code in units (40.5% 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)
    • 6 simple units (161 lines of code)
    • 49 very simple units (519 lines of code)
0% | 0% | 0% | 23% | 76%
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% | 0% | 23% | 76%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
forecastMetrics0% | 0% | 0% | 44% | 55%
rawdataprocessor0% | 0% | 0% | 27% | 72%
createForecastDataSetGroup0% | 0% | 0% | 33% | 66%
deleteExpiredForecast0% | 0% | 0% | 0% | 100%
trainDefaultPredictor0% | 0% | 0% | 0% | 100%
generateDefaultForecast0% | 0% | 0% | 0% | 100%
generateForecastExport0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def processForecastCSV()
in forecastMetrics/forecastMetrics.py
28 10 1
def processRawCSV()
in rawdataprocessor/RawDataProcesser.py
31 10 1
def onEventHandler()
in forecastMetrics/forecastMetrics.py
38 8 2
def publishMetrics()
in forecastMetrics/forecastMetrics.py
19 7 3
def getRowValueForTheDay()
in rawdataprocessor/RawDataProcesser.py
10 7 3
def onEventHandler()
in createForecastDataSetGroup/createForecastDataSetGroup.py
35 6 2
def writePreparedDataForModel()
in rawdataprocessor/RawDataProcesser.py
39 5 1
def upsertDataImportJob()
in createForecastDataSetGroup/createForecastDataSetGroup.py
25 5 3
def isExportJobExistforForcast()
in generateForecastExport/generateForecastExport.py
15 4 3
def noExistingDataset()
in deleteExpiredForecast/deleteExpiredForecast.py
13 4 2
def trigger_deleteDS()
in deleteExpiredForecast/deleteExpiredForecast.py
7 4 1
def onEventHandler()
in deleteExpiredForecast/deleteExpiredForecast.py
15 4 2
def onEventHandler()
in rawdataprocessor/RawDataProcesser.py
17 4 2
def getPredictorArnByName()
in generateDefaultForecast/generateDefaultForecast.py
12 4 3
def isForcastExistInDataSetGroup()
in generateDefaultForecast/generateDefaultForecast.py
15 4 3
def onEventHandler()
in generateDefaultForecast/generateDefaultForecast.py
14 4 2
def isPreditorExitInDataSetGroup()
in trainDefaultPredictor/trainDefaultPredictor.py
15 4 3
def onEventHandler()
in trainDefaultPredictor/trainDefaultPredictor.py
14 4 2
def onEventHandler()
in generateForecastExport/generateForecastExport.py
12 3 2
def isExistingDataSet()
in deleteExpiredForecast/deleteExpiredForecast.py
6 3 2