aws-samples / amazon-forecast-continuous-training-demo
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 55 units with 680 lines of code in units (40.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (196 lines of code)
    • 25 small units (365 lines of code)
    • 24 very small units (119 lines of code)
0% | 0% | 28% | 53% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 28% | 53% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
rawdataprocessor0% | 0% | 46% | 32% | 20%
forecastMetrics0% | 0% | 34% | 47% | 18%
createForecastDataSetGroup0% | 0% | 57% | 27% | 15%
deleteExpiredForecast0% | 0% | 0% | 84% | 15%
trainDefaultPredictor0% | 0% | 0% | 89% | 10%
generateDefaultForecast0% | 0% | 0% | 85% | 14%
generateForecastExport0% | 0% | 0% | 75% | 25%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def writePreparedDataForModel()
in rawdataprocessor/RawDataProcesser.py
39 5 1
def onEventHandler()
in forecastMetrics/forecastMetrics.py
38 8 2
def onEventHandler()
in createForecastDataSetGroup/createForecastDataSetGroup.py
35 6 2
def processRawCSV()
in rawdataprocessor/RawDataProcesser.py
31 10 1
def processForecastCSV()
in forecastMetrics/forecastMetrics.py
28 10 1
def upsertDataImportJob()
in createForecastDataSetGroup/createForecastDataSetGroup.py
25 5 3
def writeDataAndUpload()
in rawdataprocessor/RawDataProcesser.py
20 2 2
def publishMetrics()
in forecastMetrics/forecastMetrics.py
19 7 3
def getMetricData()
in forecastMetrics/forecastMetrics.py
18 1 4
def onEventHandler()
in rawdataprocessor/RawDataProcesser.py
17 4 2
def getCurrentDayRealData()
in forecastMetrics/forecastMetrics.py
16 2 1
def loadconfig()
in forecastMetrics/forecastMetrics.py
16 3 1
def loadconfig()
in createForecastDataSetGroup/createForecastDataSetGroup.py
16 3 1
def loadconfig()
in trainDefaultPredictor/trainDefaultPredictor.py
16 3 1
def isExportJobExistforForcast()
in generateForecastExport/generateForecastExport.py
15 4 3
def onEventHandler()
in deleteExpiredForecast/deleteExpiredForecast.py
15 4 2
def isForcastExistInDataSetGroup()
in generateDefaultForecast/generateDefaultForecast.py
15 4 3
def isPreditorExitInDataSetGroup()
in trainDefaultPredictor/trainDefaultPredictor.py
15 4 3
def noExistingDataImportJobs()
in deleteExpiredForecast/deleteExpiredForecast.py
14 2 2
def noExistingPredictors()
in deleteExpiredForecast/deleteExpiredForecast.py
14 2 2