awslabs / aws-templates-for-cbmc-proofs
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 64 units with 491 lines of code in units (78.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (54 lines of code)
    • 0 medium size units (0 lines of code)
    • 14 small units (230 lines of code)
    • 49 very small units (207 lines of code)
0% | 10% | 0% | 46% | 42%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 12% | 0% | 55% | 32%
c0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
template-for-repository/proofs0% | 31% | 0% | 47% | 20%
ROOT0% | 0% | 0% | 74% | 25%
scripts0% | 0% | 0% | 45% | 54%
template-for-repository/negative_tests/bounds_check0% | 0% | 0% | 0% | 100%
template-for-repository/negative_tests/pointer_overflow_check0% | 0% | 0% | 0% | 100%
template-for-repository/negative_tests/pointer_underflow_check0% | 0% | 0% | 0% | 100%
template-for-repository/negative_tests/undefined_shift_check0% | 0% | 0% | 0% | 100%
template-for-proof0% | 0% | 0% | 0% | 100%
template-for-repository/negative_tests/div_by_zero_check0% | 0% | 0% | 0% | 100%
template-for-repository/negative_tests/signed_overflow_check0% | 0% | 0% | 0% | 100%
template-for-repository/negative_tests/unsigned_overflow_check0% | 0% | 0% | 0% | 100%
template-for-repository/negative_tests/assert0% | 0% | 0% | 0% | 100%
template-for-repository/negative_tests/conversion_check0% | 0% | 0% | 0% | 100%
template-for-repository/negative_tests/signed_underflow_check0% | 0% | 0% | 0% | 100%
template-for-repository/negative_tests/nan_check0% | 0% | 0% | 0% | 100%
template-for-repository/negative_tests/float_underflow_check0% | 0% | 0% | 0% | 100%
template-for-repository/negative_tests/pointer_primitive_check0% | 0% | 0% | 0% | 100%
template-for-repository/negative_tests/pointer_check0% | 0% | 0% | 0% | 100%
template-for-repository/negative_tests/float_overflow_check0% | 0% | 0% | 0% | 100%
template-for-repository/negative_tests/unsigned_underflow_check0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def get_args()
in template-for-repository/proofs/run-cbmc-proofs.py
54 2 0
def remove_apache_reference()
in remove-apache-license-identifier.py
20 4 2
def create_parser()
in remove-apache-license-identifier.py
19 2 3
def run()
in remove-apache-license-identifier.py
19 4 3
def get_project_name()
in template-for-repository/proofs/run-cbmc-proofs.py
19 3 0
def check_uid_uniqueness()
in template-for-repository/proofs/run-cbmc-proofs.py
19 4 2
def main()
in remove-apache-license-identifier.py
18 5 0
def get_proof_dirs()
in template-for-repository/proofs/run-cbmc-proofs.py
18 9 3
def link_files()
in scripts/util.py
18 3 3
def parser()
in remove-apache-license-identifier.py
16 1 0
def main()
in scripts/setup-proof.py
16 2 0
def get_litani_path()
in template-for-repository/proofs/run-cbmc-proofs.py
14 2 1
12 3 2
def get_litani_capabilities()
in template-for-repository/proofs/run-cbmc-proofs.py
11 3 1
11 2 4
def main()
in scripts/setup.py
10 1 0
def remove_apache_references()
in remove-apache-license-identifier.py
9 4 1
def run_build()
in template-for-repository/proofs/run-cbmc-proofs.py
9 3 2
def maybe_a_copied_file()
in remove-apache-license-identifier.py
8 1 1
def files_under_root()
in scripts/util.py
8 3 1