aws / aws-parallelcluster-node
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 191 units with 1,759 lines of code in units (77.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 23 medium size units (677 lines of code)
    • 39 small units (544 lines of code)
    • 129 very small units (538 lines of code)
0% | 0% | 38% | 30% | 30%
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% | 38% | 30% | 30%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/slurm_plugin0% | 0% | 44% | 27% | 28%
src/common0% | 0% | 23% | 43% | 32%
src/common/schedulers0% | 0% | 0% | 55% | 44%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _get_config()
in src/slurm_plugin/resume.py
49 3 2
def _resume()
in src/slurm_plugin/resume.py
43 6 2
def _get_config()
in src/slurm_plugin/computemgtd.py
39 3 2
def main()
in src/slurm_plugin/suspend.py
36 3 0
def manage_cluster()
in src/slurm_plugin/clustermgtd.py
35 9 1
def _handle_protected_mode_process()
in src/slurm_plugin/clustermgtd.py
35 13 3
def _manage_compute_fleet_status_transitions()
in src/slurm_plugin/clustermgtd.py
32 11 1
def _run_computemgtd()
in src/slurm_plugin/computemgtd.py
30 8 1
def _update_dns_hostnames()
in src/slurm_plugin/instance_manager.py
30 10 2
def main()
in src/slurm_plugin/resume.py
29 3 0
def get_unhealthy_cluster_instance_status()
in src/slurm_plugin/instance_manager.py
29 5 2
def _get_basic_config()
in src/slurm_plugin/clustermgtd.py
28 2 2
def _update_slurm_node_addrs()
in src/slurm_plugin/instance_manager.py
28 9 3
def _run_command()
in src/common/utils.py
27 8 6
def is_state_healthy()
in src/slurm_plugin/slurm_resources.py
26 11 4
def _run_clustermgtd()
in src/slurm_plugin/clustermgtd.py
24 4 1
def is_bootstrap_failure()
in src/slurm_plugin/slurm_resources.py
23 8 1
def is_bootstrap_failure()
in src/slurm_plugin/slurm_resources.py
23 9 1
def _reset_nodes_in_inactive_partitions()
in src/slurm_plugin/clustermgtd.py
23 8 1
def _handle_unhealthy_static_nodes()
in src/slurm_plugin/clustermgtd.py
23 6 2