facebook / ThreatExchange
Components & Dependencies

An overview of source code logical components.

Intro

Logical decomposition is a representation of the organization of the main source code, where every and each file is put in exactly one logical component.

  • A software system can have one or more logical decompositions.
  • A logical decomposition can be defined in two ways in Sokrates.
  • First approach is based on the folders structure. Components are mapped to folders at defined folder depth relative to the source code root.
  • Second approach is based on explicit definition of each component. In such explicit definitions, components are explicitly named and their files are selected based on explicitly defined path and content filters.
  • A logical decomposition is considered invalid if a file is selected into two or more components.This constraint is introduced in order to facilitate measuring of dependencies among components.
  • Files not assigned to any component are put into a special "Unclassified" component.
Learn more...
Logical Decompositions Overview

Analyzed system has 1 logical decomposition:

  • primary (21 components)

Logical Decomposition #1: PRIMARY

The decompositions is based on the folder structure (relative to the source code root), with automatically defined folder depth to have at least 12 components.

Bubble Chart | Tree Map
Components
The "primary" logical decomposition has 21 components.
  • 430 files, 45,524 lines of code (100.0% vs. main code).
  • "hasher-matcher-actioner/hmalib" is biggest, containing 19.84% of code.
  • "hasher-matcher-actioner/hmalib_extensions" is smallest, containing 0.05% of code.


hasher-matcher-actioner/hmalib9034 LOC (19%) 93 files
hasher-matcher-actioner/webapp6787 LOC (14%) 70 files
python-threatexchange/threatexchange4689 LOC (10%) 62 files
hasher-matcher-actioner/terraform3790 LOC (8%) 49 files
api-reference-examples/java3688 LOC (8%) 22 files
api-reference-examples/python3673 LOC (8%) 28 files
pdq/java2679 LOC (5%) 17 files
tmk/cpp2267 LOC (4%) 19 files
pdq/cpp1934 LOC (4%) 15 files
pdq/php1811 LOC (3%) 14 files
api-reference-examples/ruby1455 LOC (3%) 5 files
pdq/python1263 LOC (2%) 12 files
api-reference-examples/python-notebook753 LOC (1%) 2 files
api-reference-examples/js562 LOC (1%) 3 files
api-reference-examples/php554 LOC (1%) 10 files
api-reference-examples/go205 LOC (<1%) 1 files
python-threatexchange/benchmarks149 LOC (<1%) 1 files
hasher-matcher-actioner/scripts119 LOC (<1%) 3 files
python-threatexchange60 LOC (<1%) 1 files
hasher-matcher-actioner31 LOC (<1%) 1 files
hasher-matcher-actioner/hmalib_extensions21 LOC (<1%) 2 files
Dependencies
Dependencies among components are static code dependencies among files in different components.

No component dependencies found.



2022-04-14 23:00