tensorflow / federated
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 2,415 units with 25,450 lines of code in units (63.7% of code).
    • 0 very complex units (0 lines of code)
    • 7 complex units (643 lines of code)
    • 63 medium complex units (3,132 lines of code)
    • 178 simple units (5,044 lines of code)
    • 2,167 very simple units (16,631 lines of code)
0% | 2% | 12% | 19% | 65%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 2% | 13% | 18% | 65%
cc0% | 0% | 6% | 38% | 55%
h0% | 0% | 0% | 2% | 97%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tensorflow_federated/python/core0% | 5% | 17% | 19% | 56%
tensorflow_federated/python/learning0% | 0% | 15% | 11% | 73%
tensorflow_federated/python/common_libs0% | 0% | 27% | 26% | 46%
tensorflow_federated/cc/core0% | 0% | 5% | 29% | 65%
tensorflow_federated/python/simulation0% | 0% | 5% | 16% | 78%
tensorflow_federated/python/analytics0% | 0% | 5% | 13% | 80%
tensorflow_federated/python/aggregators0% | 0% | 1% | 23% | 74%
tensorflow_federated/python/tensorflow_libs0% | 0% | 0% | 32% | 67%
tensorflow_federated/python/program0% | 0% | 0% | 23% | 76%
tensorflow_federated/experimental/python0% | 0% | 0% | 22% | 77%
tensorflow_federated/tools/runtime0% | 0% | 0% | 0% | 100%
tensorflow_federated/tools0% | 0% | 0% | 0% | 100%
tensorflow_federated/tools/client0% | 0% | 0% | 0% | 100%
tensorflow_federated/tools/python_package0% | 0% | 0% | 0% | 100%
tensorflow_federated/cc/common_libs0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _structural_representation()
in tensorflow_federated/python/core/impl/compiler/building_blocks.py
205 46 1
def infer_type()
in tensorflow_federated/python/core/impl/types/type_conversions.py
80 34 1
def transform_postorder_with_symbol_bindings()
in tensorflow_federated/python/core/impl/compiler/transformation_utils.py
104 32 3
def transform_postorder()
in tensorflow_federated/python/core/impl/compiler/transformation_utils.py
55 30 2
def trees_equal()
in tensorflow_federated/python/core/impl/compiler/tree_analysis.py
59 30 2
def check_concrete_instance_of()
in tensorflow_federated/python/core/impl/types/type_analysis.py
86 29 2
def to_type()
in tensorflow_federated/python/core/impl/types/computation_types.py
54 26 1
def _string_representation()
in tensorflow_federated/python/core/impl/types/computation_types.py
79 24 2
def type_to_py_container()
in tensorflow_federated/python/core/impl/types/type_conversions.py
81 24 2
def embed_tensorflow_computation()
in tensorflow_federated/python/core/impl/executors/eager_tf_executor.py
91 23 3
def transform_type_postorder()
in tensorflow_federated/python/core/impl/types/type_transformations.py
55 22 4
def from_container()
in tensorflow_federated/python/common_libs/structure.py
51 21 2
def coerce_dataset_elements_to_tff_type_spec()
in tensorflow_federated/python/core/impl/utils/tensorflow_utils.py
56 21 2
def create_hierarchical_histogram_aggregation_factory()
in tensorflow_federated/python/analytics/hierarchical_histogram/hierarchical_histogram_factory.py
77 21 8
def _infer_unpack_needed()
in tensorflow_federated/python/core/impl/computation/function_utils.py
40 18 3
def _lines_for_comp()
in tensorflow_federated/python/core/impl/compiler/building_blocks.py
60 18 2
def extract_nodes_consuming()
in tensorflow_federated/python/core/impl/compiler/tree_analysis.py
46 18 2
def __init__()
in tensorflow_federated/python/learning/templates/client_works.py
62 18 3
def assemble_result_from_graph()
in tensorflow_federated/python/core/impl/utils/tensorflow_utils.py
70 17 3
def _build()
in tensorflow_federated/python/core/impl/compiler/transformations.py
48 17 2