awslabs / quantum-ready-solution-for-drug-discovery
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 172 units with 3,476 lines of code in units (80.3% of code).
    • 3 very long units (441 lines of code)
    • 11 long units (743 lines of code)
    • 47 medium size units (1,427 lines of code)
    • 29 small units (421 lines of code)
    • 82 very small units (444 lines of code)
12% | 21% | 41% | 12% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts12% | 40% | 30% | 11% | 4%
py6% | 3% | 54% | 13% | 21%
js100% | 0% | 0% | 0% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/molecule-unfolding/cdk25% | 50% | 16% | 5% | <1%
src/molecule-unfolding/lambda/TaskParametersLambda35% | 0% | 50% | 4% | 8%
src/molecule-unfolding/lambda/AthenaTabeLambda100% | 0% | 0% | 0% | 0%
src/molecule-unfolding/cdk/utils0% | 32% | 45% | 16% | 6%
src/molecule-unfolding/utility0% | 7% | 54% | 19% | 18%
src/molecule-unfolding/batch-images/qa-optimizer0% | 0% | 64% | 9% | 26%
src/molecule-unfolding/lambda/DeviceAvailableCheckLambda0% | 0% | 85% | 0% | 14%
src/molecule-unfolding/batch-images/sa-optimizer0% | 0% | 49% | 0% | 50%
src/molecule-unfolding/batch-images/create-model0% | 0% | 48% | 10% | 40%
src0% | 0% | 0% | 46% | 53%
src/molecule-unfolding/lambda/WaitForTokenLambda0% | 0% | 0% | 30% | 69%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in source/src/molecule-unfolding/cdk/construct-dashboard.ts
211 3 3
def handler()
in source/src/molecule-unfolding/lambda/TaskParametersLambda/app.py
116 19 2
exports.handler = function()
in source/src/molecule-unfolding/lambda/AthenaTabeLambda/index.js
114 2 3
private createHPCStateMachine()
in source/src/molecule-unfolding/cdk/construct-benchmark.ts
92 1 0
constructor()
in source/src/molecule-unfolding/cdk/construct-benchmark.ts
82 1 3
public createNotebookIamRole()
in source/src/molecule-unfolding/cdk/utils/utils-role.ts
79 1 0
export default()
in source/src/molecule-unfolding/cdk/utils/vpc.ts
73 1 1
constructor()
in source/src/molecule-unfolding/cdk/stack-main.ts
71 1 3
public getECRImage()
in source/src/molecule-unfolding/cdk/utils/utils-images.ts
62 11 1
def atom_distance_func()
in source/src/molecule-unfolding/utility/MolGeoCalc.py
61 8 5
private createRunOnQCDeviceStateMachine()
in source/src/molecule-unfolding/cdk/construct-benchmark.ts
60 1 0
public createAggResultLambdaRole()
in source/src/molecule-unfolding/cdk/utils/utils-role.ts
56 1 0
constructor()
in source/src/molecule-unfolding/cdk/construct-notebook.ts
56 3 3
private createQCStateMachine()
in source/src/molecule-unfolding/cdk/construct-benchmark.ts
51 1 0
def build_rb_data()
in source/src/molecule-unfolding/utility/GraphModel.py
48 14 1
def _build_qubo_pre_calc()
in source/src/molecule-unfolding/utility/QMUQUBO.py
45 16 9
def validate_modelParams()
in source/src/molecule-unfolding/lambda/TaskParametersLambda/app.py
45 20 2
private createHPCAndQCStateMachine()
in source/src/molecule-unfolding/cdk/construct-benchmark.ts
40 1 2
public createQCBatchJobRole()
in source/src/molecule-unfolding/cdk/utils/utils-role.ts
40 1 1
def save_mol_file()
in source/src/molecule-unfolding/utility/ResultProcess.py
40 5 2