scitools.com

← Metric catalog

Dependency References Out is one of the source-code metrics Understand computes across 17+ languages — browse them in the GUI, export and track them, or script them with the Python API.

Dependency References Out

API ID: CountDepRefsOut
Languages: Any
Targets: Architectures

Total number of dependency references from this architecture or its descendants to other architectures.

Counts every reference, not just the number of partner architectures.

In the sample below, for "project", references out to libraries are 8 (main.cpp→library1) + 6 (api.cpp→library1) + 4 (ui.cpp→library2), so CountDepRefsOut is 18.

Compare to CountDepsOut (number of partner architectures) and CountDirectDepRefsOut (references only from this architecture's own entities).

Consider a directory-style architecture and dependencies:

Dependencies (with reference counts):

  1. main.cpp → api.cpp (3 refs)
  2. main.cpp → ui.cpp (9 refs)
  3. main.cpp → library1.cpp (8 refs)
  4. api.cpp → library1.cpp (6 refs)
  5. ui.cpp → library2.cpp (4 refs)
  6. ui.cpp → api.cpp (2 refs)
  7. main_test.cpp → main.cpp (7 refs)
  8. api_test.cpp → api.cpp (5 refs)

For project, the metrics are:

MetricValue
CountDepsIn2
CountDepsOut2
CountDepRefsIn12
CountDepRefsOut18
CountDirectDepsIn1
CountDirectDepsOut3
CountDirectDepRefsIn7
CountDirectDepRefsOut20
CountMajorDepsIn1
CountMajorDepsOut1