tensorflow / tflite-support
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 1,824 units with 20,822 lines of code in units (57.2% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (142 lines of code)
    • 32 medium complex units (2,425 lines of code)
    • 128 simple units (4,170 lines of code)
    • 1,663 very simple units (14,085 lines of code)
0% | <1% | 11% | 20% | 67%
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% | 1% | 21% | 30% | 45%
py0% | 0% | 6% | 33% | 60%
h0% | 0% | 8% | 16% | 75%
java0% | 0% | <1% | 4% | 95%
mm0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cc0% | 1% | 23% | 29% | 44%
codegen0% | 0% | 40% | 24% | 34%
custom_ops0% | 0% | 9% | 40% | 49%
metadata0% | 0% | 3% | 19% | 77%
java0% | 0% | <1% | 4% | 95%
c0% | 0% | 0% | 51% | 48%
odml0% | 0% | 0% | 23% | 76%
python0% | 0% | 0% | 0% | 100%
tools0% | 0% | 0% | 0% | 100%
acceleration0% | 0% | 0% | 0% | 100%
ios0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
absl::Status ClassificationPostprocessor::Init()
in tensorflow_lite_support/cc/task/processor/classification_postprocessor.cc
142 29 1
absl::Status ImageClassifier::CheckAndSetOutputs()
in tensorflow_lite_support/cc/task/vision/image_classifier.cc
116 20 0
StatusOr ImageClassifier::Postprocess()
in tensorflow_lite_support/cc/task/vision/image_classifier.cc
91 20 3
bool GenerateWrapperMetadata()
in tensorflow_lite_support/codegen/android_java_generator.cc
139 19 3
bool GenerateWrapperAPI()
in tensorflow_lite_support/codegen/android_java_generator.cc
152 19 3
void CodeWriter::AppendInternal()
in tensorflow_lite_support/codegen/utils.cc
47 19 2
absl::Status ExternalFileHandler::MapExternalFile()
in tensorflow_lite_support/cc/task/core/external_file_handler.cc
93 17 0
EncoderResult EncodeNormalizedString()
in tensorflow_lite_support/custom_ops/kernel/sentencepiece/optimized_encoder.cc
70 16 6
StatusOr BuildInputImageTensorSpecs()
in tensorflow_lite_support/cc/task/vision/utils/image_tensor_specs.cc
98 16 2
absl::Status ImagePreprocessor::Preprocess()
in tensorflow_lite_support/cc/task/processor/image_preprocessor.cc
101 16 2
absl::Status ClassificationPostprocessor::Postprocess()
in tensorflow_lite_support/cc/task/processor/classification_postprocessor.h
69 16 1
TfLiteStatus EvalT()
in tensorflow_lite_support/custom_ops/kernel/ragged/ragged_range_tflite.cc
65 15 2
absl::Status DecodeLin16WaveAsFloatVector()
in tensorflow_lite_support/cc/task/audio/utils/wav_io.cc
102 15 5
absl::Status NLClassifier::Initialize()
in tensorflow_lite_support/cc/task/text/nlclassifier/nl_classifier.cc
70 15 1
def create_from_metadata_info()
in tensorflow_lite_support/metadata/python/metadata_writers/object_detector.py
73 15 10
absl::Status UniformCropResizeYuv()
in tensorflow_lite_support/cc/task/vision/utils/libyuv_frame_buffer_utils.cc
106 14 3
absl::Status FrameBufferUtils::Preprocess()
in tensorflow_lite_support/cc/task/vision/utils/frame_buffer_utils.cc
56 14 4
std::vector NLClassifier::BuildResults()
in tensorflow_lite_support/cc/task/text/nlclassifier/nl_classifier.cc
37 14 2
absl::Status ImageClassifier::CheckAndSetClassNameSet()
in tensorflow_lite_support/cc/task/vision/image_classifier.cc
53 13 0
StatusOr ImageSegmenter::Postprocess()
in tensorflow_lite_support/cc/task/vision/image_segmenter.cc
80 13 3