tensorflow / tfx-bsl
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 733 units with 7,807 lines of code in units (69.3% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (210 lines of code)
    • 15 medium complex units (670 lines of code)
    • 65 simple units (2,187 lines of code)
    • 651 very simple units (4,740 lines of code)
0% | 2% | 8% | 28% | 60%
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
cc0% | 2% | 9% | 35% | 51%
py0% | 2% | 8% | 18% | 70%
h0% | 0% | 0% | 28% | 71%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tfx_bsl/cc0% | 2% | 8% | 34% | 53%
tfx_bsl/tfxio0% | 4% | 6% | 15% | 73%
tfx_bsl/beam0% | 0% | 11% | 31% | 57%
tfx_bsl/coders0% | 0% | 16% | 15% | 68%
tfx_bsl/arrow0% | 0% | 0% | 13% | 86%
ROOT0% | 0% | 0% | 27% | 72%
tfx_bsl/tools0% | 0% | 0% | 0% | 100%
tfx_bsl/types0% | 0% | 0% | 0% | 100%
tfx_bsl/statistics0% | 0% | 0% | 0% | 100%
tfx_bsl/telemetry0% | 0% | 0% | 0% | 100%
tfx_bsl/public0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
116 32 1
def GetTensor()
in tfx_bsl/tfxio/tensor_adapter.py
94 28 3
def CanHandle()
in tfx_bsl/tfxio/tensor_adapter.py
38 17 2
absl::Status MergeFeatureStatistics()
in tfx_bsl/cc/statistics/merge_util.cc
40 17 2
57 14 5
def add_input()
in tfx_bsl/coders/csv_decoder.py
18 14 4
def process()
in tfx_bsl/coders/csv_decoder.py
34 14 4
def _ProjectTfmdSchema()
in tfx_bsl/tfxio/tf_sequence_example_record.py
38 13 2
def _LegacyInferTensorRepresentationFromSchema()
in tfx_bsl/tfxio/tensor_representation_util.py
45 13 1
absl::Status MisraGriesSketch::GetCounts()
in tfx_bsl/cc/sketches/misragries_sketch.cc
50 13 1
absl::Status DecodeTopLevelFeatures()
in tfx_bsl/cc/coders/example_decoder.cc
49 13 4
def _make_io_tensor_spec()
in tfx_bsl/beam/run_inference.py
29 12 1
def _post_process()
in tfx_bsl/beam/run_inference.py
49 12 6
absl::Status MergeCrossFeatureStatistics()
in tfx_bsl/cc/statistics/merge_util.cc
35 12 2
void DefineCodersSubmodule()
in tfx_bsl/cc/coders/coders_submodule.cc
128 12 1
def _UpdateNumValuesDist()
in tfx_bsl/tfxio/telemetry.py
19 11 2
absl::Status MisraGriesSketch::Merge()
in tfx_bsl/cc/sketches/misragries_sketch.cc
41 11 1
def _post_process_regress()
in tfx_bsl/beam/run_inference.py
30 10 3
def _get_operation_type()
in tfx_bsl/beam/run_inference.py
29 10 1
absl::Status ExampleToNumpyDict()
in tfx_bsl/cc/coders/example_numpy_decoder.cc
63 10 2