pytorch / ort
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 20 units with 259 lines of code in units (33.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (126 lines of code)
    • 5 small units (83 lines of code)
    • 11 very small units (50 lines of code)
0% | 0% | 48% | 32% | 19%
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% | 48% | 32% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tools/ci_build0% | 0% | 57% | 15% | 27%
torch_ort/experimental0% | 0% | 100% | 0% | 0%
tools/python0% | 0% | 100% | 0% | 0%
tools/ci_build/github/linux0% | 0% | 0% | 100% | 0%
tools/python/util0% | 0% | 0% | 100% | 0%
ROOT0% | 0% | 0% | 43% | 56%
torch_ort/configure0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def set_propagate_cast_ops_optimization()
in torch_ort/experimental/graph_config.py
41 16 3
def parse_args()
in tools/ci_build/get_docker_image.py
34 1 0
def main()
in tools/ci_build/get_docker_image.py
27 9 0
def upload_whl()
in tools/python/upload_python_package_to_azure_storage.py
24 2 4
def is_manylinux2014_compatible()
in tools/ci_build/github/linux/docker/manylinux2014_build_scripts/manylinux-check.py
18 5 0
def have_compatible_glibc()
in tools/ci_build/github/linux/docker/manylinux2014_build_scripts/manylinux-check.py
18 7 2
def update_hash_with_directory()
in tools/ci_build/get_docker_image.py
17 6 2
def run()
in tools/python/util/run.py
16 4 9
def main()
in build.py
14 2 0
def update_hash_with_file()
in tools/ci_build/get_docker_image.py
9 3 2
def generate_tag()
in tools/ci_build/get_docker_image.py
8 1 3
def container_registry_has_image()
in tools/ci_build/get_docker_image.py
8 3 2
5 1 0
4 2 2
3 1 2
3 1 2
3 2 1
def main()
in torch_ort/configure/__main__.py
3 1 0
def file_info_str()
in tools/ci_build/get_docker_image.py
2 1 1
def make_file_info_from_path()
in tools/ci_build/get_docker_image.py
2 1 1