elastic / apm-agent-python
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
txt
feature
editorconfig
in
cfg
proto
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.

main12898 LOC (34%) 169 files
test17400 LOC (46%) 241 files
generated16 LOC (<1%) 1 file
build and deployment118 LOC (<1%) 6 files
other6711 LOC (18%) 134 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cfg
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 169 files match defined criteria (12,898 LOC, 100.0% vs. main code):
    • 164 *.py files (11,738 LOC)
    • 1 *.asciidoc files (993 LOC)
    • 1 *.cfg files (124 LOC)
    • 1 *.yaml files (25 LOC)
    • 1 *.toml files (14 LOC)
    • 1 *.in files (4 LOC)
  • " *.py" is biggest, containing 91.01% of LOC.
  • " *.in" is smallest, containing 0.03% of LOC.


*.py11738 LOC (91%) 164 files
*.asciidoc993 LOC (7%) 1 file
*.cfg124 LOC (<1%) 1 file
*.yaml25 LOC (<1%) 1 file
*.toml14 LOC (<1%) 1 file
*.in4 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
feature
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/tests_.*".
    • files with paths like ".*[.]feature".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*[-]tests[-].*".
  • 241 files match defined criteria (17,400 LOC, 134.9% vs. main code):
    • 166 *.py files (16,535 LOC)
    • 6 *.feature files (497 LOC)
    • 61 *.sh files (312 LOC)
    • 7 *.html files (41 LOC)
    • 1 *.proto files (15 LOC)
  • " *.py" is biggest, containing 95.03% of LOC.
  • " *.proto" is smallest, containing 0.09% of LOC.


*.py16535 LOC (95%) 166 files
*.feature497 LOC (2%) 6 files
*.sh312 LOC (1%) 61 files
*.html41 LOC (<1%) 7 files
*.proto15 LOC (<1%) 1 file
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.](py|java|h|cc|cpp|m|rb|php)" AND any line of content like ".*Generated by the protocol buffer compiler[.][ ]+DO NOT EDIT[!].*".
  • 1 file matches defined criteria (16 LOC, 0.1% vs. main code). All matches are in *.py files.


*.py16 LOC (100%) 1 file
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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]bat".
  • 6 files match defined criteria (118 LOC, 0.9% vs. main code):
    • 4 *.sh files (84 LOC)
    • 2 *.bat files (34 LOC)
  • " *.sh" is biggest, containing 71.19% of LOC.
  • " *.bat" is smallest, containing 28.81% of LOC.


*.sh84 LOC (71%) 4 files
*.bat34 LOC (28%) 2 files
Other Code
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]svg".
  • 134 files match defined criteria (6,711 LOC, 52.0% vs. main code):
    • 22 *.json files (6,087 LOC)
    • 107 *.txt files (314 LOC)
    • 4 *.md files (283 LOC)
    • 1 *.rst files (27 LOC)
  • " *.json" is biggest, containing 90.7% of LOC.
  • " *.rst" is smallest, containing 0.4% of LOC.


*.json6087 LOC (90%) 22 files
*.txt314 LOC (4%) 107 files
*.md283 LOC (4%) 4 files
*.rst27 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 19:42