spotify / tfx
Source Code Overview

Analysis scope, overview of main, test, generated, deployment, build, and other code.

Source Code Analysis Scope
Files includes and excluded from analyses
proto
pb
txt
meta
com
in
cfg
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.

  • The main category contains all manually created source code files that are being used in the production.
  • Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
  • Test source code files are used only for testing of the product. These files are normally not deployed to production.
  • Build and deployment source code files are used to configure or support build and deployment process.
  • Generated source code files are automatically generated files that have not been manually changed after generation.
  • While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
  • Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.

main43256 LOC (26%) 604 files
test46357 LOC (28%) 329 files
generated0 LOC (0%) 0 files
build and deployment153 LOC (<1%) 5 files
other70470 LOC (43%) 183 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
in
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 604 files match defined criteria (43,256 LOC, 100.0% vs. main code):
    • 539 *.py files (40,346 LOC)
    • 27 *.proto files (2,371 LOC)
    • 2 *.ipynb files (230 LOC)
    • 32 *.yaml files (173 LOC)
    • 2 *.bzl files (115 LOC)
    • 1 *.in files (12 LOC)
    • 1 *.cfg files (9 LOC)
  • " *.py" is biggest, containing 93.27% of LOC.
  • " *.cfg" is smallest, containing 0.02% of LOC.


*.py40346 LOC (93%) 539 files
*.proto2371 LOC (5%) 27 files
*.ipynb230 LOC (<1%) 2 files
*.yaml173 LOC (<1%) 32 files
*.bzl115 LOC (<1%) 2 files
*.in12 LOC (<1%) 1 file
*.cfg9 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_mock[.][a-zA-Z0-9_\-]+".
    • files with paths like ".*/e2e/.*".
  • 329 files match defined criteria (46,357 LOC, 107.2% vs. main code). All matches are in *.py files.


*.py46357 LOC (100%) 329 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/docker[-]compose[.]yaml".
  • 5 files match defined criteria (153 LOC, 0.4% vs. main code). All matches are in *.sh files.


*.sh153 LOC (100%) 5 files
Other Code
pb
proto
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]pb".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]dockerignore".
  • 183 files match defined criteria (70,470 LOC, 162.9% vs. main code):
    • 4 *.pb files (55,321 LOC)
    • 123 *.py files (9,900 LOC)
    • 40 *.md files (3,904 LOC)
    • 1 *.ipynb files (984 LOC)
    • 10 *.sh files (261 LOC)
    • 1 *.proto files (56 LOC)
    • 3 *.txt files (25 LOC)
    • 1 *.yaml files (19 LOC)
  • " *.pb" is biggest, containing 78.5% of LOC.
  • " *.yaml" is smallest, containing 0.03% of LOC.


*.pb55321 LOC (78%) 4 files
*.py9900 LOC (14%) 123 files
*.md3904 LOC (5%) 40 files
*.ipynb984 LOC (1%) 1 file
*.sh261 LOC (<1%) 10 files
*.proto56 LOC (<1%) 1 file
*.txt25 LOC (<1%) 3 files
*.yaml19 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-01-17 11:40